Can I make the pytest doctest module ignore a file? : <p>We use pytest to test our project and have enabled <code>--doctest-modules</code> by default to collect all of our doctests from across the project.</p>

<p>However there is one <code>wsgi.py</code> which may not be imported during test collection, but I cant get pytest to ignore it.</p>

<p>I tried putting it in the <code>collect_ignore</code> list in <code>conftest.py</code> but apparently the doctest module does not use this list.</p>

<p>The only thing that does work is putting the whole directory of <code>wsgi.py</code> into <code>norecursedirs</code> in the pytest config file, but this obviously hides the whole directory, which I don't want.</p>

<p>Is there a way to make the doctest module ignore just a certain file?</p>
