How to use the pandarallel.utils.inliner.get_instructions_offsets function in pandarallel

To help you get started, we’ve selected a few pandarallel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nalepae / pandarallel / tests / test_inliner.py View on Github external
# JUMP_ABSOLUTE
                    b"qD\x00",
                    b"W",
                    b"d\x00\x00",
                    b"S",
                )
            )

            assert bytecode == func.__code__.co_code
            assert inliner.get_shifted_bytecode(func, 2) == expected_shifted_bytecode

        elif python_version.minor in (6, 7):
            pass
    else:
        with pytest.raises(SystemError):
            inliner.get_instructions_offsets(function)
github nalepae / pandarallel / tests / test_inliner.py View on Github external
b"d\x00\x00",
                b"S",
            )
        elif python_version.minor in (6, 7):
            assert tuple(inliner.get_instructions_tuples(function)) == (
                b"t\x00",
                b"|\x00",
                b"|\x01",
                b"\x83\x02",
                b"\x01\x00",
                b"d\x00",
                b"S\x00",
            )
    else:
        with pytest.raises(SystemError):
            inliner.get_instructions_offsets(function)