diff options
Diffstat (limited to 'Lib/importlib/test/test_util.py')
-rw-r--r-- | Lib/importlib/test/test_util.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/importlib/test/test_util.py b/Lib/importlib/test/test_util.py index 706128a..406477d 100644 --- a/Lib/importlib/test/test_util.py +++ b/Lib/importlib/test/test_util.py @@ -29,8 +29,8 @@ class ModuleForLoaderTests(unittest.TestCase): module_name = 'a.b.c' with test_util.uncache(module_name): module = self.return_module(module_name) - self.assert_(module_name in sys.modules) - self.assert_(isinstance(module, types.ModuleType)) + self.assertTrue(module_name in sys.modules) + self.assertTrue(isinstance(module, types.ModuleType)) self.assertEqual(module.__name__, module_name) def test_reload(self): @@ -40,7 +40,7 @@ class ModuleForLoaderTests(unittest.TestCase): with test_util.uncache(name): sys.modules[name] = module returned_module = self.return_module(name) - self.assert_(sys.modules[name] is returned_module) + self.assertTrue(sys.modules[name] is returned_module) def test_new_module_failure(self): # Test that a module is removed from sys.modules if added but an @@ -48,7 +48,7 @@ class ModuleForLoaderTests(unittest.TestCase): name = 'a.b.c' with test_util.uncache(name): self.raise_exception(name) - self.assert_(name not in sys.modules) + self.assertTrue(name not in sys.modules) def test_reload_failure(self): # Test that a failure on reload leaves the module in-place. @@ -57,7 +57,7 @@ class ModuleForLoaderTests(unittest.TestCase): with test_util.uncache(name): sys.modules[name] = module self.raise_exception(name) - self.assert_(sys.modules[name] is module) + self.assertTrue(sys.modules[name] is module) class SetPackageTests(unittest.TestCase): @@ -71,7 +71,7 @@ class SetPackageTests(unittest.TestCase): fxn = lambda: module wrapped = util.set_package(fxn) wrapped() - self.assert_(hasattr(module, '__package__')) + self.assertTrue(hasattr(module, '__package__')) self.assertEqual(expect, module.__package__) def test_top_level(self): |