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

pypy.module.sys.test.apptest_monitoring:test_fire_py_start_return

def test_fire_py_start_return():
        E = sys.monitoring.events
        events = []
    
        def callback(*args):
            events.append(args)
    
        sys.monitoring.use_tool_id(3, "test tool")
        try:
            sys.monitoring.register_callback(3, E.PY_START, callback)
            sys.monitoring.register_callback(3, E.PY_RETURN, callback)
            sys.monitoring.set_events(3, E.PY_START | E.PY_RETURN)
    
            def f():
                return 42
    
            events.clear()
            assert f() == 42
>           assert len(events) == 2
E           assert 1 == 2
E            +  where 1 = len([(<code object f at 0x00007fb9c9b79b78, file "/buildbot/slave/pypy-c-jit-linux-x86-64/build/pypy/module/sys/test/appte...ildbot/slave/pypy-c-jit-linux-x86-64/venv/pypy-venv/lib/pypy3.12/site-packages/pluggy/_manager.py", line 516>, 0), ...])

../build/pypy/module/sys/test/apptest_monitoring.py:316: AssertionError
builder: pypy-c-jit-linux-x86-64 build #11971+
test: pypy.module.sys.test.apptest_monitoring:test_fire_py_start_return