We use pytest to test our project and have included --doctest-modules by default to compile all our doctrines from the whole project.
However, there is one wsgi.py that cannot be imported during the test collection, but I cannot force pytest to ignore it.
I tried putting it in the collect_ignore list in conftest.py , but apparently the doctest module does not use this list.
The only thing that works is to put the whole wsgi.py directory in norecursedirs in the pytest configuration file, but this explicitly hides the whole directory that I don't want.
Is there a way to force the doctest module to ignore only a specific file?
source share