Commit 3a0de08d authored by Raymond Hettinger's avatar Raymond Hettinger

Fix test of count.__repr__() to ignore the 'L' if the count is a long

parent d476a400
......@@ -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'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment