diff options
author | Georg Brandl <georg@python.org> | 2009-08-13 08:51:18 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-08-13 08:51:18 (GMT) |
commit | ab91fdef1f1e556203a2eee98ba7d379e4790de9 (patch) | |
tree | 6f8f00dc18cc5f2801a675df277c2c595eb85ec8 /Lib/importlib/test/builtin/test_loader.py | |
parent | ef82be368abdea8e8032500e7ecc3a22f5f07851 (diff) | |
download | cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.zip cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.gz cpython-ab91fdef1f1e556203a2eee98ba7d379e4790de9.tar.bz2 |
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*
........
Diffstat (limited to 'Lib/importlib/test/builtin/test_loader.py')
-rw-r--r-- | Lib/importlib/test/builtin/test_loader.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/importlib/test/builtin/test_loader.py b/Lib/importlib/test/builtin/test_loader.py index cfedb5d..dff00ce 100644 --- a/Lib/importlib/test/builtin/test_loader.py +++ b/Lib/importlib/test/builtin/test_loader.py @@ -18,10 +18,10 @@ class LoaderTests(abc.LoaderTests): def verify(self, module): """Verify that the module matches against what it should have.""" - self.assert_(isinstance(module, types.ModuleType)) + self.assertTrue(isinstance(module, types.ModuleType)) for attr, value in self.verification.items(): self.assertEqual(getattr(module, attr), value) - self.assert_(module.__name__ in sys.modules) + self.assertTrue(module.__name__ in sys.modules) load_module = staticmethod(lambda name: machinery.BuiltinImporter.load_module(name)) @@ -49,7 +49,7 @@ class LoaderTests(abc.LoaderTests): with util.uncache(builtin_util.NAME): module1 = self.load_module(builtin_util.NAME) module2 = self.load_module(builtin_util.NAME) - self.assert_(module1 is module2) + self.assertTrue(module1 is module2) def test_unloadable(self): name = 'dssdsdfff' @@ -70,17 +70,17 @@ class InspectLoaderTests(unittest.TestCase): def test_get_code(self): # There is no code object. result = machinery.BuiltinImporter.get_code(builtin_util.NAME) - self.assert_(result is None) + self.assertTrue(result is None) def test_get_source(self): # There is no source. result = machinery.BuiltinImporter.get_source(builtin_util.NAME) - self.assert_(result is None) + self.assertTrue(result is None) def test_is_package(self): # Cannot be a package. result = machinery.BuiltinImporter.is_package(builtin_util.NAME) - self.assert_(not result) + self.assertTrue(not result) def test_not_builtin(self): # Modules not built-in should raise ImportError. |