From: Brett Cannon Date: Mon, 11 Jun 2012 15:02:36 +0000 (-0400) Subject: Make a test easier to read. X-Git-Tag: v3.3.0b1~239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b383c431a37cb8b779edb8f7558c4c258e8f587;p=thirdparty%2FPython%2Fcpython.git Make a test easier to read. --- diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py index 1eee15fd9507..b5cc68096a49 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), - "" % (areallylongpackageandmodulenametotestreprtruncation.__name__, areallylongpackageandmodulenametotestreprtruncation.__file__)) - eq(repr(sys), "") + module = areallylongpackageandmodulenametotestreprtruncation + self.assertEqual(repr(module), "" % (module.__name__, module.__file__)) + self.assertEqual(repr(sys), "") def test_type(self): self._check_path_limitations('foo')