Skip to content

Commit

Permalink
pythongh-111808: Fix recursion error on WASM in test_typing (python…
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored and aisk committed Feb 11, 2024
1 parent abeaf80 commit eb7367e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import weakref
import types

from test.support import captured_stderr, cpython_only
from test.support import captured_stderr, cpython_only, infinite_recursion
from test import mod_generics_cache
from test import _typed_dict_helper

Expand Down Expand Up @@ -5622,10 +5622,11 @@ def fun(x: a): pass
def cmp(o1, o2):
return o1 == o2

r1 = namespace1()
r2 = namespace2()
self.assertIsNot(r1, r2)
self.assertRaises(RecursionError, cmp, r1, r2)
with infinite_recursion(25): # magic number, small but reasonable
r1 = namespace1()
r2 = namespace2()
self.assertIsNot(r1, r2)
self.assertRaises(RecursionError, cmp, r1, r2)

def test_union_forward_recursion(self):
ValueList = List['Value']
Expand Down

0 comments on commit eb7367e

Please sign in to comment.