summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_range.py
diff options
context:
space:
mode:
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 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)