def test_count(self):
        self.assertEqual(lzip('abc',count()), [('a', 0), ('b', 1), ('c', 2)])
        self.assertEqual(lzip('abc',count(3)), [('a', 3), ('b', 4), ('c', 5)])
        self.assertEqual(take(2, lzip('abc',count(3))), [('a', 3), ('b', 4)])
        self.assertEqual(take(2, zip('abc',count(-1))), [('a', -1), ('b', 0)])
        self.assertEqual(take(2, zip('abc',count(-3))), [('a', -3), ('b', -2)])
        self.assertRaises(TypeError, count, 2, 3, 4)
        self.assertRaises(TypeError, count, 'a')
        self.assertEqual(list(islice(count(maxsize-5), 10)),
                         list(range(maxsize-5, maxsize+5)))
        self.assertEqual(list(islice(count(-maxsize-5), 10)),
                         list(range(-maxsize-5, -maxsize+5)))
        self.assertEqual(list(islice(count(10, maxsize+5), 3)),
                         list(range(10, 10+3*(maxsize+5), maxsize+5)))
        c = count(3)
        self.assertEqual(repr(c), 'count(3)')
        next(c)
        self.assertEqual(repr(c), 'count(4)')
        c = count(-9)
        self.assertEqual(repr(c), 'count(-9)')
        next(c)
        self.assertEqual(repr(count(10.25)), 'count(10.25)')
        self.assertEqual(next(c), -8)
        for i in (-sys.maxsize-5, -sys.maxsize+5 ,-10, -1, 0, 10, sys.maxsize-5, sys.maxsize+5):
            # Test repr
            r1 = repr(count(i))
            r2 = 'count(%r)'.__mod__(i)
            self.assertEqual(r1, r2)

        # check copy, deepcopy, pickle
        for value in -3, 3, maxsize-5, maxsize+5:
            c = count(value)
            self.assertEqual(next(copy.copy(c)), value)
            self.assertEqual(next(copy.deepcopy(c)), value)
            self.pickletest(count(value))

        #check proper internal error handling for large "step' sizes
        count(1, maxsize+5); sys.exc_info()
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_itertools.py/TestBasicOps.test_count/original