diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-05-19 12:16:04 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-05-19 12:16:04 (GMT) |
commit | 7bc452d604397925f8b9495494cb6537bfb16bf5 (patch) | |
tree | e3350be21e1a26d17d7bb6a68175f3009cd21962 /Lib/test/test_pprint.py | |
parent | e09b42c914e1d533bb598ddf58727ed7b5792a58 (diff) | |
download | cpython-7bc452d604397925f8b9495494cb6537bfb16bf5.zip cpython-7bc452d604397925f8b9495494cb6537bfb16bf5.tar.gz cpython-7bc452d604397925f8b9495494cb6537bfb16bf5.tar.bz2 |
Back out changeset 955dffec3d94 since it broke the buildbots.
and the situation has not been addressed in several days.
Diffstat (limited to 'Lib/test/test_pprint.py')
-rw-r--r-- | Lib/test/test_pprint.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py index f3508a9..9e5309c 100644 --- a/Lib/test/test_pprint.py +++ b/Lib/test/test_pprint.py @@ -91,8 +91,7 @@ class QueryTestCase(unittest.TestCase): def test_basic(self): # Verify .isrecursive() and .isreadable() w/o recursion pp = pprint.PrettyPrinter() - for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, b"def", - bytearray(b"ghi"), True, False, None, + for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, "yaddayadda", self.a, self.b): # module-level convenience functions self.assertFalse(pprint.isrecursive(safe), @@ -162,23 +161,21 @@ class QueryTestCase(unittest.TestCase): # it sorted a dict display if and only if the display required # multiple lines. For that reason, dicts with more than one element # aren't tested here. - for simple in (0, 0, 0+0j, 0.0, "", b"", bytearray(), + for simple in (0, 0, 0+0j, 0.0, "", b"", (), tuple2(), tuple3(), [], list2(), list3(), set(), set2(), set3(), frozenset(), frozenset2(), frozenset3(), {}, dict2(), dict3(), self.assertTrue, pprint, - -6, -6, -6-6j, -1.5, "x", b"x", bytearray(b"x"), - (3,), [3], {3: 6}, + -6, -6, -6-6j, -1.5, "x", b"x", (3,), [3], {3: 6}, (1,2), [3,4], {5: 6}, tuple2((1,2)), tuple3((1,2)), tuple3(range(100)), [3,4], list2([3,4]), list3([3,4]), list3(range(100)), set({7}), set2({7}), set3({7}), frozenset({8}), frozenset2({8}), frozenset3({8}), dict2({5: 6}), dict3({5: 6}), - range(10, -11, -1), - True, False, None, + range(10, -11, -1) ): native = repr(simple) self.assertEqual(pprint.pformat(simple), native) @@ -1008,5 +1005,9 @@ class DottedPrettyPrinter(pprint.PrettyPrinter): self, object, context, maxlevels, level) +def test_main(): + test.support.run_unittest(QueryTestCase) + + if __name__ == "__main__": - unittest.main() + test_main() |