abalkin / pytest-leaks

A pytest plugin to trace resource leaks.
https://abalkin.github.io/pytest-leaks
Other
115 stars 4 forks source link

doctest_namespace in fixture leaks spuriously #34

Open pv opened 4 years ago

pv commented 4 years ago

Numpy has the following in its conftest.py:

@pytest.fixture(autouse=True)
def add_np(doctest_namespace, request):
    doctest_namespace['np'] = numpy

For some reason, this makes pytest-leaks report a leak. Didn't so far find out why this happens, but maybe possible to fix in future if necessary.