From: Raymond Hettinger Date: Fri, 12 Oct 2007 17:53:11 +0000 (+0000) Subject: Fix test of count.__repr__() to ignore the 'L' if the count is a long X-Git-Tag: v2.6a1~1191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a0de08d5468c18ba09443cbe2f3b661ddd775e0;p=python Fix test of count.__repr__() to ignore the 'L' if the count is a long --- diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 3a370d965f..1a3064c305 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -67,7 +67,10 @@ class TestBasicOps(unittest.TestCase): c.next() self.assertEqual(c.next(), -8) for i in (-sys.maxint-5, -sys.maxint+5 ,-10, -1, 0, 10, sys.maxint-5, sys.maxint+5): - self.assertEqual(repr(count(i)), 'count(%r)' % i) + # Test repr (ignoring the L in longs) + r1 = repr(count(i)).replace('L', '') + r2 = 'count(%r)'.__mod__(i).replace('L', '') + self.assertEqual(r1, r2) def test_cycle(self): self.assertEqual(take(10, cycle('abc')), list('abcabcabca'))