mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -43,7 +43,7 @@ class LoaderTests(abc.LoaderTests):
|
|||
with util.uncache('__hello__'):
|
||||
module1 = machinery.FrozenImporter.load_module('__hello__')
|
||||
module2 = machinery.FrozenImporter.load_module('__hello__')
|
||||
self.assert_(module1 is module2)
|
||||
self.assertTrue(module1 is module2)
|
||||
|
||||
def test_state_after_failure(self):
|
||||
# No way to trigger an error in a frozen module.
|
||||
|
@ -65,12 +65,12 @@ class InspectLoaderTests(unittest.TestCase):
|
|||
code = machinery.FrozenImporter.get_code(name)
|
||||
mod = imp.new_module(name)
|
||||
exec(code, mod.__dict__)
|
||||
self.assert_(hasattr(mod, 'initialized'))
|
||||
self.assertTrue(hasattr(mod, 'initialized'))
|
||||
|
||||
def test_get_source(self):
|
||||
# Should always return None.
|
||||
result = machinery.FrozenImporter.get_source('__hello__')
|
||||
self.assert_(result is None)
|
||||
self.assertTrue(result is None)
|
||||
|
||||
def test_is_package(self):
|
||||
# Should be able to tell what is a package.
|
||||
|
@ -78,7 +78,7 @@ class InspectLoaderTests(unittest.TestCase):
|
|||
('__phello__.spam', False))
|
||||
for name, is_package in test_for:
|
||||
result = machinery.FrozenImporter.is_package(name)
|
||||
self.assert_(bool(result) == is_package)
|
||||
self.assertTrue(bool(result) == is_package)
|
||||
|
||||
def test_failure(self):
|
||||
# Raise ImportError for modules that are not frozen.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue