summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pprint.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-07-14 04:13:29 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-07-14 04:13:29 (GMT)
commitab078e9ed1a5d1b693d6ee843f1a34e8993e9dee (patch)
tree55e6e21b81315f126e76357af7e545cfe498d778 /Lib/test/test_pprint.py
parentfb4f8257bfa4471764e10c1d8525a5bb7b0145e5 (diff)
downloadcpython-ab078e9ed1a5d1b693d6ee843f1a34e8993e9dee.zip
cpython-ab078e9ed1a5d1b693d6ee843f1a34e8993e9dee.tar.gz
cpython-ab078e9ed1a5d1b693d6ee843f1a34e8993e9dee.tar.bz2
Backed out changeset af29d89083b3 (closes #25548) (closes #27498)
Diffstat (limited to 'Lib/test/test_pprint.py')
-rw-r--r--Lib/test/test_pprint.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index 2283923..7ebc298 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -848,11 +848,12 @@ bytearray(b'\\x00\\x01\\x02\\x03'
def test_default_dict(self):
d = collections.defaultdict(int)
- self.assertRegex(pprint.pformat(d, width=1), r"defaultdict\(<class 'int' at 0x.+>, {}\)")
+ self.assertEqual(pprint.pformat(d, width=1), "defaultdict(<class 'int'>, {})")
words = 'the quick brown fox jumped over a lazy dog'.split()
d = collections.defaultdict(int, zip(words, itertools.count()))
- self.assertRegex(pprint.pformat(d),
-r"""defaultdict\(<class 'int' at 0x.+>,
+ self.assertEqual(pprint.pformat(d),
+"""\
+defaultdict(<class 'int'>,
{'a': 6,
'brown': 2,
'dog': 8,
@@ -861,7 +862,7 @@ r"""defaultdict\(<class 'int' at 0x.+>,
'lazy': 7,
'over': 5,
'quick': 1,
- 'the': 0}\)""")
+ 'the': 0})""")
def test_counter(self):
d = collections.Counter()