From 3a0de08d5468c18ba09443cbe2f3b661ddd775e0 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 12 Oct 2007 17:53:11 +0000 Subject: Fix test of count.__repr__() to ignore the 'L' if the count is a long --- Lib/test/test_itertools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/test/test_itertools.py') 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')) -- cgit v1.2.1