Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a882a7

Browse files
committed
Add an extra testcase.
1 parent 6dfff19 commit 8a882a7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_itertools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from test import support
33
from itertools import *
44
from weakref import proxy
5+
from decimal import Decimal
56
import sys
67
import operator
78
import random
@@ -356,6 +357,8 @@ def test_count_with_stride(self):
356357
self.assertEqual(take(20, count(maxsize-15, 3)), take(20, range(maxsize-15, maxsize+100, 3)))
357358
self.assertEqual(take(20, count(-maxsize-15, 3)), take(20, range(-maxsize-15,-maxsize+100, 3)))
358359
self.assertEqual(take(3, count(2, 3.25-4j)), [2, 5.25-4j, 8.5-8j])
360+
self.assertEqual(take(3, count(Decimal('1.1'), Decimal('.1'))),
361+
[Decimal('1.1'), Decimal('1.2'), Decimal('1.3')])
359362
self.assertEqual(repr(take(3, count(10, 2.5))), repr([10, 12.5, 15.0]))
360363
c = count(3, 5)
361364
self.assertEqual(repr(c), 'count(3, 5)')

0 commit comments

Comments
 (0)