Skip to content

gh-111808: Fix recursion error on WASM in test_typing #111819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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