Skip to content

Commit 5ddece5

Browse files
Merge pull request #442 from neutrinoceros/tst/runtime-introspect
2 parents 5222ae0 + 41428a3 commit 5ddece5

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Changelog = "https://github.com/neutrinoceros/gpgi/blob/main/CHANGELOG.md"
5252
[dependency-groups]
5353
test = [
5454
"pytest>=9.0.0",
55+
"runtime-introspect>=0.3.0",
5556
]
5657
test-image = [
5758
{include-group = "test"},

tests/conftest.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import sys
2-
from importlib.metadata import version
1+
import textwrap
32
from importlib.util import find_spec
43

54
import pytest
5+
from runtime_introspect import runtime_feature_set
66

77
import gpgi
88

@@ -27,12 +27,12 @@ def pytest_runtest_setup(item):
2727
pytest.skip("missing requirement: pytest_mpl")
2828

2929

30-
def pytest_report_header(config, start_path):
31-
is_gil_enabled = sys.version_info < (3, 13) or sys._is_gil_enabled()
32-
30+
def pytest_report_header(config, start_path) -> list[str]:
31+
fs = runtime_feature_set()
32+
diagnostics = fs.diagnostics(features=["free-threading", "JIT"])
3333
return [
34-
f"{is_gil_enabled = }",
35-
f"NumPy: {version('numpy')}",
34+
"Runtime optional features state (snapshot):",
35+
textwrap.indent("\n".join(diagnostics), " "),
3636
f"{gpgi._IS_PY_LIB = }",
3737
f"gpgi._lib loads from {find_spec('gpgi._lib').origin}",
3838
]

uv.lock

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)