mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix SystemError and a wasps nest of ref counting issues.
This commit is contained in:
parent
83eacca7a6
commit
94f5583777
3 changed files with 33 additions and 8 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue