Merge pull request #4509 from Tadaboody/doc_doctest_fixture_pitfall_1495

Document doctest fixture pitfalls
This commit is contained in:
Ronny Pfannschmidt 2018-12-05 15:40:45 +01:00 committed by GitHub
commit 818aa4d343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

1
changelog/1495.doc.rst Normal file
View File

@ -0,0 +1 @@
Document common doctest fixture directory tree structure pitfalls

View File

@ -154,6 +154,9 @@ which can then be used in your doctests directly::
"""
pass
Note that like the normal ``conftest.py``, the fixtures are discovered in the directory tree conftest is in.
Meaning that if you put your doctest with your source code, the relevant conftest.py needs to be in the same directory tree.
Fixtures will not be discovered in a sibling directory tree!
Output format
-------------