summaryrefslogtreecommitdiff
path: root/Lib/test/test_range.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-06-12 18:40:16 +0000
committerRaymond Hettinger <python@rcn.com>2009-06-12 18:40:16 +0000
commit94f55837775f00eade742fa015d818633ab68318 (patch)
treef61f92b50485609d21e7c9c7912cccf065873387 /Lib/test/test_range.py
parent83eacca7a601df925a36455119633167a9093cdb (diff)
downloadcpython-git-94f55837775f00eade742fa015d818633ab68318.tar.gz
Fix SystemError and a wasps nest of ref counting issues.
Diffstat (limited to 'Lib/test/test_range.py')
-rw-r--r--Lib/test/test_range.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_range.py b/Lib/test/test_range.py
index 43fadf01d1..7650103bd0 100644
--- a/Lib/test/test_range.py
+++ b/Lib/test/test_range.py
@@ -71,6 +71,13 @@ class RangeTest(unittest.TestCase):
self.assertEquals(list(pickle.loads(pickle.dumps(r, proto))),
list(r))
+ def test_odd_bug(self):
+ # This used to raise a "SystemError: NULL result without error"
+ # because the range validation step was eating the exception
+ # before NULL was returned.
+ with self.assertRaises(TypeError):
+ range([], 1, -1)
+
def test_main():
test.support.run_unittest(RangeTest)