Content-Length: 272053 | pFad | http://github.com/honno/array-api-tests/commit/e1fe6fb6eff909331b53b3fdeb77fe29c2f83313

67 Merge pull request #258 from asmeurer/header · honno/array-api-tests@e1fe6fb · GitHub
Skip to content

Commit e1fe6fb

Browse files
authored
Merge pull request data-apis#258 from asmeurer/header
Add a header to the tests indicating the module and API version
2 parents e38ce34 + 8e21362 commit e1fe6fb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@
1212
from array_api_tests import _array_module as xp
1313
from array_api_tests import api_version
1414
from array_api_tests._array_module import _UndefinedStub
15+
from array_api_tests.stubs import EXTENSIONS
16+
from array_api_tests import xp_name
1517

1618
from reporting import pytest_metadata, pytest_json_modifyreport, add_extra_json_metadata # noqa
1719

20+
def pytest_report_header(config):
21+
disabled_extensions = config.getoption("--disable-extension")
22+
enabled_extensions = sorted({
23+
ext for ext in EXTENSIONS + ['fft'] if ext not in disabled_extensions and xp_has_ext(ext)
24+
})
25+
26+
return f"Array API Tests Module: {xp_name}. API Version: {api_version}. Enabled Extensions: {', '.join(enabled_extensions)}"
1827

1928
def pytest_addoption(parser):
2029
# Hypothesis max examples

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/honno/array-api-tests/commit/e1fe6fb6eff909331b53b3fdeb77fe29c2f83313

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy