diff options
author | Eric V. Smith <eric@trueblade.com> | 2012-06-27 19:26:26 (GMT) |
---|---|---|
committer | Eric V. Smith <eric@trueblade.com> | 2012-06-27 19:26:26 (GMT) |
commit | faae3adbb98521d039c574fd3ed417f54a72374d (patch) | |
tree | c5d7689408588d896a54dc7dfcf13172a93a1cb4 /Lib/importlib/test/frozen/test_loader.py | |
parent | 8d37ffa563cf552dd34990bfefd935eef8adfd11 (diff) | |
download | cpython-faae3adbb98521d039c574fd3ed417f54a72374d.zip cpython-faae3adbb98521d039c574fd3ed417f54a72374d.tar.gz cpython-faae3adbb98521d039c574fd3ed417f54a72374d.tar.bz2 |
Changed importlib tests to use assertIs, assertIsInstance, etc., instead of just assertTrue.
Diffstat (limited to 'Lib/importlib/test/frozen/test_loader.py')
-rw-r--r-- | Lib/importlib/test/frozen/test_loader.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/importlib/test/frozen/test_loader.py b/Lib/importlib/test/frozen/test_loader.py index 6819a09..87a479a 100644 --- a/Lib/importlib/test/frozen/test_loader.py +++ b/Lib/importlib/test/frozen/test_loader.py @@ -55,7 +55,7 @@ class LoaderTests(abc.LoaderTests): with util.uncache('__hello__'), captured_stdout() as stdout: module1 = machinery.FrozenImporter.load_module('__hello__') module2 = machinery.FrozenImporter.load_module('__hello__') - self.assertTrue(module1 is module2) + self.assertIs(module1, module2) self.assertEqual(stdout.getvalue(), 'Hello world!\nHello world!\n') @@ -93,7 +93,7 @@ class InspectLoaderTests(unittest.TestCase): def test_get_source(self): # Should always return None. result = machinery.FrozenImporter.get_source('__hello__') - self.assertTrue(result is None) + self.assertIs(result, None) def test_is_package(self): # Should be able to tell what is a package. @@ -101,7 +101,7 @@ class InspectLoaderTests(unittest.TestCase): ('__phello__.spam', False)) for name, is_package in test_for: result = machinery.FrozenImporter.is_package(name) - self.assertTrue(bool(result) == is_package) + self.assertEqual(bool(result), is_package) def test_failure(self): # Raise ImportError for modules that are not frozen. |