summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-06-12 18:40:16 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-06-12 18:40:16 (GMT)
commit94f55837775f00eade742fa015d818633ab68318 (patch)
treef61f92b50485609d21e7c9c7912cccf065873387 /Lib
parent83eacca7a601df925a36455119633167a9093cdb (diff)
downloadcpython-94f55837775f00eade742fa015d818633ab68318.zip
cpython-94f55837775f00eade742fa015d818633ab68318.tar.gz
cpython-94f55837775f00eade742fa015d818633ab68318.tar.bz2
Fix SystemError and a wasps nest of ref counting issues.
Diffstat (limited to 'Lib')
-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 43fadf0..7650103 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)