mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Add an extra testcase.
This commit is contained in:
parent
66373ab888
commit
aa04461260
1 changed files with 3 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
from test import test_support
|
||||
from itertools import *
|
||||
from weakref import proxy
|
||||
from decimal import Decimal
|
||||
import sys
|
||||
import operator
|
||||
import random
|
||||
|
|
@ -350,6 +351,8 @@ def test_count_with_stride(self):
|
|||
self.assertEqual(take(20, count(maxsize-15, 3)), take(20, range(maxsize-15, maxsize+100, 3)))
|
||||
self.assertEqual(take(20, count(-maxsize-15, 3)), take(20, range(-maxsize-15,-maxsize+100, 3)))
|
||||
self.assertEqual(take(3, count(2, 3.25-4j)), [2, 5.25-4j, 8.5-8j])
|
||||
self.assertEqual(take(3, count(Decimal('1.1'), Decimal('.1'))),
|
||||
[Decimal('1.1'), Decimal('1.2'), Decimal('1.3')])
|
||||
self.assertEqual(repr(take(3, count(10, 2.5))), repr([10, 12.5, 15.0]))
|
||||
c = count(3, 5)
|
||||
self.assertEqual(repr(c), 'count(3, 5)')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue