mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
This commit is contained in:
parent
ef82be368a
commit
ab91fdef1f
274 changed files with 4538 additions and 4538 deletions
|
|
@ -74,15 +74,15 @@ def test_build_ext(self):
|
|||
import xx
|
||||
|
||||
for attr in ('error', 'foo', 'new', 'roj'):
|
||||
self.assert_(hasattr(xx, attr))
|
||||
self.assertTrue(hasattr(xx, attr))
|
||||
|
||||
self.assertEquals(xx.foo(2, 5), 7)
|
||||
self.assertEquals(xx.foo(13,15), 28)
|
||||
self.assertEquals(xx.new().demo(), None)
|
||||
doc = 'This is a template module just for instruction.'
|
||||
self.assertEquals(xx.__doc__, doc)
|
||||
self.assert_(isinstance(xx.Null(), xx.Null))
|
||||
self.assert_(isinstance(xx.Str(), xx.Str))
|
||||
self.assertTrue(isinstance(xx.Null(), xx.Null))
|
||||
self.assertTrue(isinstance(xx.Str(), xx.Str))
|
||||
|
||||
def tearDown(self):
|
||||
# Get everything back to normal
|
||||
|
|
@ -114,7 +114,7 @@ def test_solaris_enable_shared(self):
|
|||
_config_vars['Py_ENABLE_SHARED'] = old_var
|
||||
|
||||
# make sure we get some library dirs under solaris
|
||||
self.assert_(len(cmd.library_dirs) > 0)
|
||||
self.assertTrue(len(cmd.library_dirs) > 0)
|
||||
|
||||
def test_user_site(self):
|
||||
# site.USER_SITE was introduced in 2.6
|
||||
|
|
@ -128,7 +128,7 @@ def test_user_site(self):
|
|||
# making sure the user option is there
|
||||
options = [name for name, short, lable in
|
||||
cmd.user_options]
|
||||
self.assert_('user' in options)
|
||||
self.assertTrue('user' in options)
|
||||
|
||||
# setting a value
|
||||
cmd.user = 1
|
||||
|
|
@ -144,9 +144,9 @@ def test_user_site(self):
|
|||
|
||||
# see if include_dirs and library_dirs
|
||||
# were set
|
||||
self.assert_(lib in cmd.library_dirs)
|
||||
self.assert_(lib in cmd.rpath)
|
||||
self.assert_(incl in cmd.include_dirs)
|
||||
self.assertTrue(lib in cmd.library_dirs)
|
||||
self.assertTrue(lib in cmd.rpath)
|
||||
self.assertTrue(incl in cmd.include_dirs)
|
||||
|
||||
def test_optional_extension(self):
|
||||
|
||||
|
|
@ -175,10 +175,10 @@ def test_finalize_options(self):
|
|||
|
||||
from distutils import sysconfig
|
||||
py_include = sysconfig.get_python_inc()
|
||||
self.assert_(py_include in cmd.include_dirs)
|
||||
self.assertTrue(py_include in cmd.include_dirs)
|
||||
|
||||
plat_py_include = sysconfig.get_python_inc(plat_specific=1)
|
||||
self.assert_(plat_py_include in cmd.include_dirs)
|
||||
self.assertTrue(plat_py_include in cmd.include_dirs)
|
||||
|
||||
# make sure cmd.libraries is turned into a list
|
||||
# if it's a string
|
||||
|
|
@ -192,7 +192,7 @@ def test_finalize_options(self):
|
|||
cmd = build_ext(dist)
|
||||
cmd.library_dirs = 'my_lib_dir'
|
||||
cmd.finalize_options()
|
||||
self.assert_('my_lib_dir' in cmd.library_dirs)
|
||||
self.assertTrue('my_lib_dir' in cmd.library_dirs)
|
||||
|
||||
# make sure rpath is turned into a list
|
||||
# if it's a list of os.pathsep's paths
|
||||
|
|
@ -257,13 +257,13 @@ def test_check_extensions_list(self):
|
|||
'some': 'bar'})]
|
||||
cmd.check_extensions_list(exts)
|
||||
ext = exts[0]
|
||||
self.assert_(isinstance(ext, Extension))
|
||||
self.assertTrue(isinstance(ext, Extension))
|
||||
|
||||
# check_extensions_list adds in ext the values passed
|
||||
# when they are in ('include_dirs', 'library_dirs', 'libraries'
|
||||
# 'extra_objects', 'extra_compile_args', 'extra_link_args')
|
||||
self.assertEquals(ext.libraries, 'foo')
|
||||
self.assert_(not hasattr(ext, 'some'))
|
||||
self.assertTrue(not hasattr(ext, 'some'))
|
||||
|
||||
# 'macros' element of build info dict must be 1- or 2-tuple
|
||||
exts = [('foo.bar', {'sources': [''], 'libraries': 'foo',
|
||||
|
|
@ -321,7 +321,7 @@ def test_get_outputs(self):
|
|||
so_file = cmd.get_outputs()[0]
|
||||
finally:
|
||||
os.chdir(old_wd)
|
||||
self.assert_(os.path.exists(so_file))
|
||||
self.assertTrue(os.path.exists(so_file))
|
||||
self.assertEquals(os.path.splitext(so_file)[-1],
|
||||
sysconfig.get_config_var('SO'))
|
||||
so_dir = os.path.dirname(so_file)
|
||||
|
|
@ -330,7 +330,7 @@ def test_get_outputs(self):
|
|||
cmd.inplace = 0
|
||||
cmd.run()
|
||||
so_file = cmd.get_outputs()[0]
|
||||
self.assert_(os.path.exists(so_file))
|
||||
self.assertTrue(os.path.exists(so_file))
|
||||
self.assertEquals(os.path.splitext(so_file)[-1],
|
||||
sysconfig.get_config_var('SO'))
|
||||
so_dir = os.path.dirname(so_file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue