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

ctypes_tests.test_functions:test_keepalive_buffers

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x0000000140990d08>
dll = <[TypeError("unsupported operand type(s) for &: '_rawffi.alt.CDLL' and 'int'") raised in repr()] CDLL object at 0x153d45c20>

    @pytest.mark.pypy_only
    def test_keepalive_buffers(monkeypatch, dll):
        import gc
        f = dll.my_strchr
        f.argtypes = [c_char_p]
        f.restype = c_char_p
        #
        orig__call_funcptr = f._call_funcptr
        def _call_funcptr(funcptr, *newargs):
            gc.collect()
            gc.collect()
            gc.collect()
            return orig__call_funcptr(funcptr, *newargs)
        monkeypatch.setattr(f, '_call_funcptr', _call_funcptr)
        #
        result = f(b"abcd", ord("b"))
>       assert result == b"bcd"
E       AssertionError: assert b'' == b'bcd'
E         Use -v to get the full diff

../build/extra_tests/ctypes_tests/test_functions.py:85: AssertionError
builder: pypy-c-jit-macos-arm64 build #1295+
test: ctypes_tests.test_functions:test_keepalive_buffers