From cb52d17d07eade32e58968e098cd27c18c27a20a Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Wed, 5 Dec 2018 11:25:52 +0200 Subject: [PATCH 1/2] Document doctest fixture pitfalls --- doc/en/doctest.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/en/doctest.rst b/doc/en/doctest.rst index 52edd4cf2..125ed3aa7 100644 --- a/doc/en/doctest.rst +++ b/doc/en/doctest.rst @@ -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 ------------- From b7a64d67294832792157f23fa41acea4a0d3fde2 Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Wed, 5 Dec 2018 11:29:32 +0200 Subject: [PATCH 2/2] Create changelog file for 1495 --- changelog/1495.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1495.doc.rst diff --git a/changelog/1495.doc.rst b/changelog/1495.doc.rst new file mode 100644 index 000000000..ab7231333 --- /dev/null +++ b/changelog/1495.doc.rst @@ -0,0 +1 @@ +Document common doctest fixture directory tree structure pitfalls