summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_itertools.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-12 12:04:26 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-02-12 12:04:26 (GMT)
commitaa04461260452369b4dc8bf1bf08dd4ee47fa87a (patch)
tree421f6a3b4160cd15c334bfa1858c54a722dc135e /Lib/test/test_itertools.py
parent66373ab88809844e571c4c6e6756f20261a50cd0 (diff)
downloadcpython-aa04461260452369b4dc8bf1bf08dd4ee47fa87a.zip
cpython-aa04461260452369b4dc8bf1bf08dd4ee47fa87a.tar.gz
cpython-aa04461260452369b4dc8bf1bf08dd4ee47fa87a.tar.bz2
Add an extra testcase.
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r--Lib/test/test_itertools.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 9e6b7c8..553d723 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -2,6 +2,7 @@ import unittest
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 @@ 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(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)')