Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing extensions are not ignored by default #329

Open
lucascolley opened this issue Dec 27, 2024 · 3 comments
Open

missing extensions are not ignored by default #329

lucascolley opened this issue Dec 27, 2024 · 3 comments

Comments

@lucascolley
Copy link
Member

array-api-tests/README.md

Lines 174 to 179 in 606cc4d

#### Extensions
By default, tests for the optional Array API extensions such as
[`linalg`](https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html)
will be skipped if not present in the specified array module. You can purposely
skip testing extension(s) via the `--disable-extension` option.

seems false. See https://github.com/mdhaber/marray/actions/runs/12521857195/job/34929420471?pr=47, which runs pytest -v -rxXfE --ci --max-examples=100 --derandomize --disable-deadline array_api_tests/

@lucascolley
Copy link
Member Author

perhaps

if category in EXTENSIONS:
ext_mod = getattr(xp, category)
assert hasattr(ext_mod, name), f"{xp.__name__} is missing the {category} extension function {name}()"

should be using enabled_extensions from here

disabled_extensions = config.getoption("--disable-extension")
enabled_extensions = sorted({
ext for ext in EXTENSIONS + ['fft'] if ext not in disabled_extensions and xp_has_ext(ext)
})

@lucascolley
Copy link
Member Author

it seems that test_has_names doesn't take --disable-extension into account when it is set either.

@ev-br
Copy link
Contributor

ev-br commented Jan 1, 2025

PR most welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants