diff options
author | Raymond Hettinger <python@rcn.com> | 2004-05-21 23:01:18 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-05-21 23:01:18 (GMT) |
commit | 1453e4aa7587898954acc49e7680a9d65c5d2c74 (patch) | |
tree | 924d4ba5074803fdd5eca5169767ed500981e842 /Lib/test/test_repr.py | |
parent | ba6cd3647ff5bd0415dcdb4649a5e6a7a88c0e72 (diff) | |
download | cpython-1453e4aa7587898954acc49e7680a9d65c5d2c74.zip cpython-1453e4aa7587898954acc49e7680a9d65c5d2c74.tar.gz cpython-1453e4aa7587898954acc49e7680a9d65c5d2c74.tar.bz2 |
* teach repr.repr() about collections.deque()
* rename a variable for clarity
Diffstat (limited to 'Lib/test/test_repr.py')
-rw-r--r-- | Lib/test/test_repr.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py index b00f328..4ded484 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -35,6 +35,7 @@ class ReprTests(unittest.TestCase): def test_container(self): from array import array + from collections import deque eq = self.assertEquals # Tuples give up after 6 elements @@ -65,6 +66,9 @@ class ReprTests(unittest.TestCase): eq(r(frozenset([1, 2, 3, 4, 5, 6])), "frozenset([1, 2, 3, 4, 5, 6])") eq(r(frozenset([1, 2, 3, 4, 5, 6, 7])), "frozenset([1, 2, 3, 4, 5, 6, ...])") + # collections.deque after 6 + eq(r(deque([1, 2, 3, 4, 5, 6, 7])), "deque([1, 2, 3, 4, 5, 6, ...])") + # Dictionaries give up after 4. eq(r({}), "{}") d = {'alice': 1, 'bob': 2, 'charles': 3, 'dave': 4} |