File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,7 @@ issues](https://github.com/data-apis/array-api-tests/issues/) to us.
136136By default, tests for the optional Array API extensions such as
137137[ ` linalg ` ] ( https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html )
138138will be skipped if not present in the specified array module. You can purposely
139- skip testing extension(s) via the ` --disable-extension ` option, and likewise
140- purposely test them via the ` --enable-extension ` option.
139+ skip testing extension(s) via the ` --disable-extension ` option.
141140
142141The tests make heavy use
143142[ Hypothesis] ( https://hypothesis.readthedocs.io/en/latest/ ) . You can configure
Original file line number Diff line number Diff line change @@ -27,14 +27,7 @@ def pytest_addoption(parser):
2727 action = "store_true" ,
2828 help = "disable the Hypothesis deadline" ,
2929 )
30- # enable/disable extensions
31- parser .addoption (
32- "--enable-extension" ,
33- metavar = "ext" ,
34- nargs = "+" ,
35- default = [],
36- help = "enable testing for Array API extension(s)" ,
37- )
30+ # disable extensions
3831 parser .addoption (
3932 "--disable-extension" ,
4033 metavar = "ext" ,
@@ -82,21 +75,17 @@ def xp_has_ext(ext: str) -> bool:
8275
8376
8477def pytest_collection_modifyitems (config , items ):
85- enabled_exts = config .getoption ("--enable-extension" )
8678 disabled_exts = config .getoption ("--disable-extension" )
87- for ext in enabled_exts :
88- if ext in disabled_exts :
89- raise ValueError (f"{ ext = } both enabled and disabled" )
9079 for item in items :
91- # enable/ disable extensions
80+ # disable extensions
9281 try :
9382 ext_mark = next (m for m in item .iter_markers () if m .name == "xp_extension" )
9483 ext = ext_mark .args [0 ]
9584 if ext in disabled_exts :
9685 item .add_marker (
9786 mark .skip (reason = f"{ ext } disabled in --disable-extensions" )
9887 )
99- elif ext not in enabled_exts and not xp_has_ext (ext ):
88+ elif not xp_has_ext (ext ):
10089 item .add_marker (mark .skip (reason = f"{ ext } not found in array module" ))
10190 except StopIteration :
10291 pass
You can’t perform that action at this time.
0 commit comments