Skip to content

Commit cc1ced4

Browse files
committed
test: PyPy still compiles comprehensions as functions
1 parent 85a9088 commit cc1ced4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/test_bytecode.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def h(x):
3333
objs = list(bp.code_objects())
3434

3535
expected = {"<module>", "f", "g", "j", "h"}
36-
if env.PYVERSION < (3, 12):
36+
if env.PYVERSION < (3, 12) or env.PYPY:
3737
# Comprehensions were compiled as implicit functions in earlier
38-
# versions of Python.
38+
# versions of CPython. PyPy still compiles them that way.
3939
expected.update({"<setcomp>", "<listcomp>"})
4040
assert {c.co_name for c in objs} == expected
4141

0 commit comments

Comments
 (0)