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

Skip to content

Commit de09acf

Browse files
committed
One more test.
1 parent 8a882a7 commit de09acf

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
@@ -3,6 +3,7 @@
33
from itertools import *
44
from weakref import proxy
55
from decimal import Decimal
6+
from fractions import Fraction
67
import sys
78
import operator
89
import random
@@ -359,6 +360,8 @@ def test_count_with_stride(self):
359360
self.assertEqual(take(3, count(2, 3.25-4j)), [2, 5.25-4j, 8.5-8j])
360361
self.assertEqual(take(3, count(Decimal('1.1'), Decimal('.1'))),
361362
[Decimal('1.1'), Decimal('1.2'), Decimal('1.3')])
363+
self.assertEqual(take(3, count(Fraction(2,3), Fraction(1,7))),
364+
[Fraction(2,3), Fraction(17,21), Fraction(20,21)])
362365
self.assertEqual(repr(take(3, count(10, 2.5))), repr([10, 12.5, 15.0]))
363366
c = count(3, 5)
364367
self.assertEqual(repr(c), 'count(3, 5)')

0 commit comments

Comments
 (0)