Skip to content

Commit 611c7d9

Browse files
committed
fix test for pypy3.12
1 parent 44904db commit 611c7d9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎vmprof/test/test_run.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ def test_nested_call():
191191
t = t['']
192192
assert len(t.children) == 1
193193
assert 'function_foo' in t[''].name
194-
if sys.version_info >= (3, 12):
194+
# PEP 709 (inlined comprehensions) is CPython 3.12+, PyPy still creates
195+
# a separate <listcomp> code object and frame.
196+
if sys.version_info >= (3, 12) and '__pypy__' not in sys.builtin_module_names:
195197
assert len(t[''].children) == 0
196198
else:
197199
assert len(t[''].children) == 1

0 commit comments

Comments
 (0)