summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-11-20 22:35:41 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-11-20 22:35:41 (GMT)
commit0b458d52f9c58f0a47ea448e2349704fd33a7fe3 (patch)
treef39a5ecfd620ce0df8b8854e91e3dcb6d03c75d6 /Lib/test/test_builtin.py
parent2e579f0a87cdc196eb3df2ccdf8d85b628793637 (diff)
downloadcpython-0b458d52f9c58f0a47ea448e2349704fd33a7fe3.zip
cpython-0b458d52f9c58f0a47ea448e2349704fd33a7fe3.tar.gz
cpython-0b458d52f9c58f0a47ea448e2349704fd33a7fe3.tar.bz2
count() should return integers #10474
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r--Lib/test/test_builtin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index d2d4fa9..4d9b5c3 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -1033,6 +1033,8 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(range(3).count(1), 1)
self.assertEqual(range(3).count(2), 1)
self.assertEqual(range(3).count(3), 0)
+ self.assertIs(type(range(3).count(-1)), int)
+ self.assertIs(type(range(3).count(1)), int)
self.assertEqual(range(10**20).count(1), 1)
self.assertEqual(range(10**20).count(10**20), 0)