Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/13038.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document that doctests do not support parametrized fixtures, including parametrized autouse fixtures.
6 changes: 6 additions & 0 deletions doc/en/how-to/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ unless explicitly configured by :confval:`python_files`.
Also, the :ref:`usefixtures <usefixtures>` mark and fixtures marked as :ref:`autouse <autouse>` are supported
when executing text doctest files.

Doctests do not support fixtures that depend on parametrization, because doctest
collection does not perform the same test generation as normal test functions.
This includes parametrized autouse fixtures. If you need to run doctests against
multiple backends or configurations, consider moving those checks into normal
test functions or a dedicated doctest plugin.


.. _`doctest_namespace`:

Expand Down
Loading