Skip to content

Commit 311d60b

Browse files
committed
exception raised when fixture is applied to marked func
1 parent 4b164d9 commit 311d60b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/_pytest/fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,8 @@ def pytest_fixture_setup(fixturedef, request):
950950
kwargs[argname] = result
951951

952952
fixturefunc = resolve_fixture_function(fixturedef, request)
953+
if hasattr(fixturefunc,'pytestmark'):
954+
raise Exception('i did it!')
953955
my_cache_key = request.param_index
954956
try:
955957
result = call_fixture_func(fixturefunc, request, kwargs)

0 commit comments

Comments
 (0)