diff options
author | Raymond Hettinger <python@rcn.com> | 2009-06-12 18:40:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-06-12 18:40:16 (GMT) |
commit | 94f55837775f00eade742fa015d818633ab68318 (patch) | |
tree | f61f92b50485609d21e7c9c7912cccf065873387 /Lib | |
parent | 83eacca7a601df925a36455119633167a9093cdb (diff) | |
download | cpython-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.py | 7 |
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) |