Skip to content

Commit 818aa4d

Browse files
Merge pull request #4509 from Tadaboody/doc_doctest_fixture_pitfall_1495
Document doctest fixture pitfalls
2 parents 60599b6 + b7a64d6 commit 818aa4d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

changelog/1495.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Document common doctest fixture directory tree structure pitfalls

doc/en/doctest.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ which can then be used in your doctests directly::
154154
"""
155155
pass
156156

157+
Note that like the normal ``conftest.py``, the fixtures are discovered in the directory tree conftest is in.
158+
Meaning that if you put your doctest with your source code, the relevant conftest.py needs to be in the same directory tree.
159+
Fixtures will not be discovered in a sibling directory tree!
157160

158161
Output format
159162
-------------

0 commit comments

Comments
 (0)