m.def("add", &add, "A function which adds two numbers with logging"); m.def("divide", &divide, "A function which divides two numbers with logging"); ...
"""Makes sure that the GIL can be acquired by another module from a GIL-released state.""" m.test_cross_module_gil_released() # Should not raise a SIGSEGV def test_cross_module_gil_acquired(): ...