diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-07 11:08:19 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-07 11:08:19 (GMT) |
commit | 344f8316fd52205b19689dbdf44cfcfb338d127e (patch) | |
tree | 3f56062a019d3b50ea5974cfb5b74d16dee52f6b /Lib/test/test_import.py | |
parent | 3bc13cc8b0b85f989b8da9c5718fc5319ad06248 (diff) | |
download | cpython-344f8316fd52205b19689dbdf44cfcfb338d127e.zip cpython-344f8316fd52205b19689dbdf44cfcfb338d127e.tar.gz cpython-344f8316fd52205b19689dbdf44cfcfb338d127e.tar.bz2 |
Issue #19593: Use specific asserts in importlib tests.
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index bda1541..781a159 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -190,12 +190,12 @@ class ImportTests(unittest.TestCase): # import x.y.z binds x in the current namespace import test as x import test.support - self.assertTrue(x is test, x.__name__) + self.assertIs(x, test, x.__name__) self.assertTrue(hasattr(test.support, "__file__")) # import x.y.z as w binds z as w import test.support as y - self.assertTrue(y is test.support, y.__name__) + self.assertIs(y, test.support, y.__name__) def test_failing_reload(self): # A failing reload should leave the module object in sys.modules. @@ -223,7 +223,7 @@ class ImportTests(unittest.TestCase): self.assertRaises(ZeroDivisionError, importlib.reload, mod) # But we still expect the module to be in sys.modules. mod = sys.modules.get(TESTFN) - self.assertIsNot(mod, None, "expected module to be in sys.modules") + self.assertIsNotNone(mod, "expected module to be in sys.modules") # We should have replaced a w/ 10, but the old b value should # stick. |