Commit b52b50a1 authored by Raymond Hettinger's avatar Raymond Hettinger

Add an extra testcase.

parent 5f5ec8ef
...@@ -2,6 +2,7 @@ import unittest ...@@ -2,6 +2,7 @@ import unittest
from test import support from test import support
from itertools import * from itertools import *
from weakref import proxy from weakref import proxy
from decimal import Decimal
import sys import sys
import operator import operator
import random import random
...@@ -356,6 +357,8 @@ class TestBasicOps(unittest.TestCase): ...@@ -356,6 +357,8 @@ class TestBasicOps(unittest.TestCase):
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(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(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])) self.assertEqual(repr(take(3, count(10, 2.5))), repr([10, 12.5, 15.0]))
c = count(3, 5) c = count(3, 5)
self.assertEqual(repr(c), 'count(3, 5)') self.assertEqual(repr(c), 'count(3, 5)')
......
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