Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy.interpreter.test.apptest_compiler:test_dont_share_lambdas

def test_dont_share_lambdas():
        if not IS_PYPY:
            skip("pypy-only optimization")
        # the two lambdas's codes aren't shared (CPython does that but it's
        # completely pointless: it only applies to identical lambdas that are
        # defined on the same line)
        code = compile("x = lambda: 0; y = lambda: 0", "<test>", "exec")
        consts = code.co_consts
        x, y, z = consts
        assert isinstance(x, type(code)) and isinstance(y, type(code))
        assert x is not y
>       assert x == y
E       assert <code object <lambda> at 0x00007fb9d3fa8f70, file "<test>", line 1> == <code object <lambda> at 0x00007fb9cdbc3830, file "<test>", line 1>

../build/pypy/interpreter/test/apptest_compiler.py:216: AssertionError
builder: pypy-c-jit-linux-x86-64 build #11971+
test: pypy.interpreter.test.apptest_compiler:test_dont_share_lambdas