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 2
2
from pathlib import Path
3
3
4
4
from hypothesis import settings
5
- from pytest import mark , fixture
5
+ from pytest import mark
6
6
7
7
from array_api_tests import _array_module as xp
8
8
from array_api_tests ._array_module import _UndefinedStub
@@ -126,6 +126,3 @@ def pytest_collection_modifyitems(config, items):
126
126
ci_mark = next ((m for m in markers if m .name == "ci" ), None )
127
127
if ci_mark is None :
128
128
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 8
8
9
9
from hypothesis .strategies import SearchStrategy
10
10
11
- from pytest import mark
11
+ from pytest import mark , fixture
12
12
try :
13
13
import pytest_jsonreport # noqa
14
14
except ImportError :
@@ -42,8 +42,7 @@ def pytest_metadata(metadata):
42
42
metadata ['array_api_tests_module' ] = xp .mod_name
43
43
metadata ['array_api_tests_version' ] = __version__
44
44
45
- # This is dynamically decorated as a fixture in pytest_collection_modifyitems
46
- # when --json-report is used.
45
+ @fixture (autouse = True )
47
46
def add_extra_json_metadata (request , json_metadata ):
48
47
"""
49
48
Additional per-test metadata for --json-report
You can’t perform that action at this time.
0 commit comments