Skip to content
Open
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
4 changes: 2 additions & 2 deletions pytest_relaxed/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# NOTE: don't see any other way to get access to pytest innards besides using
# the underscored name :(
from _pytest.fixtures import getfixturemarker
from _pytest.python import PyCollector


Expand All @@ -27,8 +28,7 @@ def istestfunction(obj, name):
"teardown",
"teardown_method",
)
# TODO: is this reliable? how about __pytest_wrapped__?
is_fixture = hasattr(obj, "_pytestfixturefunction")
is_fixture = getfixturemarker(obj) is not None
return not (is_hidden_name or is_fixture)


Expand Down