mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Add stack overflow checking to Python
This commit is contained in:
parent
47a53e143b
commit
7521bf9e73
16 changed files with 47 additions and 46 deletions
|
@ -219,7 +219,12 @@ class DictSetTest(unittest.TestCase):
|
|||
d = {}
|
||||
for i in range(sys.getrecursionlimit() + 100):
|
||||
d = {42: d.values()}
|
||||
self.assertRaises(RecursionError, repr, d)
|
||||
try:
|
||||
repr(d)
|
||||
except (RecursionError, MemoryError):
|
||||
pass
|
||||
else:
|
||||
assert False
|
||||
|
||||
def test_copy(self):
|
||||
d = {1: 10, "a": "ABC"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue