diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-02-05 18:29:34 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-02-05 18:29:34 (GMT) |
commit | 6ee0480521901d3e84769d1590603f89efd456a4 (patch) | |
tree | 9ecc2d6febd0422f8ea6018c7625a02c7b636f60 /Lib/test/test_repr.py | |
parent | 5c4ded2c3b59aa134b82ab17cdfe7ab633194ca6 (diff) | |
download | cpython-6ee0480521901d3e84769d1590603f89efd456a4.zip cpython-6ee0480521901d3e84769d1590603f89efd456a4.tar.gz cpython-6ee0480521901d3e84769d1590603f89efd456a4.tar.bz2 |
[680789] Debug with long array takes forever
Added array.array to the types repr.py knows about, after a suggestion
from Jurjen N.E. Bos.
Diffstat (limited to 'Lib/test/test_repr.py')
-rw-r--r-- | Lib/test/test_repr.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_repr.py b/Lib/test/test_repr.py index 47ec07c..29e1687 100644 --- a/Lib/test/test_repr.py +++ b/Lib/test/test_repr.py @@ -34,6 +34,8 @@ class ReprTests(unittest.TestCase): eq(r(s), expected) def test_container(self): + from array import array + eq = self.assertEquals # Tuples give up after 6 elements eq(r(()), "()") @@ -56,6 +58,16 @@ class ReprTests(unittest.TestCase): d['arthur'] = 1 eq(r(d), "{'alice': 1, 'arthur': 1, 'bob': 2, 'charles': 3, ...}") + # array.array after 5. + eq(r(array('i')), "array('i', [])") + eq(r(array('i', [1])), "array('i', [1])") + eq(r(array('i', [1, 2])), "array('i', [1, 2])") + eq(r(array('i', [1, 2, 3])), "array('i', [1, 2, 3])") + eq(r(array('i', [1, 2, 3, 4])), "array('i', [1, 2, 3, 4])") + eq(r(array('i', [1, 2, 3, 4, 5])), "array('i', [1, 2, 3, 4, 5])") + eq(r(array('i', [1, 2, 3, 4, 5, 6])), + "array('i', [1, 2, 3, 4, 5, ...])") + def test_numbers(self): eq = self.assertEquals eq(r(123), repr(123)) |