diff options
author | Brett Cannon <brett@python.org> | 2012-06-11 15:02:36 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-06-11 15:02:36 (GMT) |
commit | 7b383c431a37cb8b779edb8f7558c4c258e8f587 (patch) | |
tree | 11826cfec850af4c1a1eeeb7a1d768e50905808a /Lib/test/test_reprlib.py | |
parent | 839a482a1159767aa34ce947b7e3429396c2325e (diff) | |
download | cpython-7b383c431a37cb8b779edb8f7558c4c258e8f587.zip cpython-7b383c431a37cb8b779edb8f7558c4c258e8f587.tar.gz cpython-7b383c431a37cb8b779edb8f7558c4c258e8f587.tar.bz2 |
Make a test easier to read.
Diffstat (limited to 'Lib/test/test_reprlib.py')
-rw-r--r-- | Lib/test/test_reprlib.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py index 1eee15f..b5cc680 100644 --- a/Lib/test/test_reprlib.py +++ b/Lib/test/test_reprlib.py @@ -251,13 +251,12 @@ class LongReprTest(unittest.TestCase): def test_module(self): self._check_path_limitations(self.pkgname) - eq = self.assertEqual create_empty_file(os.path.join(self.subpkgname, self.pkgname + '.py')) importlib.invalidate_caches() from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import areallylongpackageandmodulenametotestreprtruncation - eq(repr(areallylongpackageandmodulenametotestreprtruncation), - "<module %r from %r>" % (areallylongpackageandmodulenametotestreprtruncation.__name__, areallylongpackageandmodulenametotestreprtruncation.__file__)) - eq(repr(sys), "<module 'sys' (built-in)>") + module = areallylongpackageandmodulenametotestreprtruncation + self.assertEqual(repr(module), "<module %r from %r>" % (module.__name__, module.__file__)) + self.assertEqual(repr(sys), "<module 'sys' (built-in)>") def test_type(self): self._check_path_limitations('foo') |