]> granicus.if.org Git - python/commitdiff
Move over to assertIs.
authorBrett Cannon <bcannon@gmail.com>
Mon, 21 Jun 2010 02:49:35 +0000 (02:49 +0000)
committerBrett Cannon <bcannon@gmail.com>
Mon, 21 Jun 2010 02:49:35 +0000 (02:49 +0000)
Lib/importlib/test/test_util.py

index 406477dd42ce3473d85b26a02de5b541cead84ed..602447f09e4844b5cd5aa7554bd1a258a4f8b69d 100644 (file)
@@ -40,7 +40,7 @@ class ModuleForLoaderTests(unittest.TestCase):
         with test_util.uncache(name):
             sys.modules[name] = module
             returned_module = self.return_module(name)
-            self.assertTrue(sys.modules[name] is returned_module)
+            self.assertIs(returned_module, sys.modules[name])
 
     def test_new_module_failure(self):
         # Test that a module is removed from sys.modules if added but an
@@ -57,7 +57,7 @@ class ModuleForLoaderTests(unittest.TestCase):
         with test_util.uncache(name):
             sys.modules[name] = module
             self.raise_exception(name)
-            self.assertTrue(sys.modules[name] is module)
+            self.assertIs(module, sys.modules[name])
 
 
 class SetPackageTests(unittest.TestCase):