|
|
|
|
|
by masklinn
1593 days ago
|
|
@pytest.fixture
def libfact():
yield CDLL("./fact.so")
FWIW that's pretty confusing as it gives the impression the library is reloaded for every test, but iirc dlopen() will just return a handle to the existing one. I don't think ctypes has a good way to unload dlls so it should probably be `fixture(scope='session')`.That gets more relevant when on-the-fly compilation is added to the mix, spawning a compiler for every test is a complete waste of time. |
|