Skip to content

Commit

Permalink
fix: does not add fixture when it's a doctest [APE-1236] (#1569)
Browse files Browse the repository at this point in the history
* fix: does not add  fixture when it's a doctest

* fix: does not add  fixture when it's a doctest

* Update src/ape/pytest/runners.py

---------

Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
  • Loading branch information
nazariyv and fubuloubu authored Jul 27, 2023
1 parent 97c1fac commit 553d08a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ape/pytest/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def pytest_runtest_setup(self, item):
"""
if (
self.config_wrapper.isolation is False
or "_function_isolation" in item.fixturenames # prevent double injection
or isinstance(item, pytest.DoctestItem) # doctests don't have fixturenames
or "_function_isolation" in item.fixturenames # prevent double injection
):
# isolation is disabled via cmdline option
return
Expand Down

0 comments on commit 553d08a

Please sign in to comment.