File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 22from pathlib import Path
33
44from hypothesis import settings
5- from pytest import mark , fixture
5+ from pytest import mark
66
77from array_api_tests import _array_module as xp
88from array_api_tests ._array_module import _UndefinedStub
@@ -126,6 +126,3 @@ def pytest_collection_modifyitems(config, items):
126126 ci_mark = next ((m for m in markers if m .name == "ci" ), None )
127127 if ci_mark is None :
128128 item .add_marker (mark .skip (reason = "disabled via --ci" ))
129-
130- if config .getoption ('--json-report' ):
131- fixture (autouse = True )(add_extra_json_metadata )
Original file line number Diff line number Diff line change 88
99from hypothesis .strategies import SearchStrategy
1010
11- from pytest import mark
11+ from pytest import mark , fixture
1212try :
1313 import pytest_jsonreport # noqa
1414except ImportError :
@@ -42,8 +42,7 @@ def pytest_metadata(metadata):
4242 metadata ['array_api_tests_module' ] = xp .mod_name
4343 metadata ['array_api_tests_version' ] = __version__
4444
45- # This is dynamically decorated as a fixture in pytest_collection_modifyitems
46- # when --json-report is used.
45+ @fixture (autouse = True )
4746def add_extra_json_metadata (request , json_metadata ):
4847 """
4948 Additional per-test metadata for --json-report
You can’t perform that action at this time.
0 commit comments