Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bottleneck/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import textwrap
from importlib.util import find_spec

import pytest

HAS_PYTEST_PARALLEL_RUN = find_spec("pytest_run_parallel") is not None
HAS_RUNTIME_INTROSPECT = find_spec("runtime_introspect") is not None


def pytest_configure(config):
Expand All @@ -29,3 +31,17 @@ def pytest_configure(config):
@pytest.fixture
def num_parallel_threads():
return 1


def pytest_report_header(config, start_path) -> list[str]:
if not HAS_RUNTIME_INTROSPECT:
return

from runtime_introspect import runtime_feature_set

fs = runtime_feature_set()
diagnostics = fs.diagnostics(features=["free-threading", "JIT"])
return [
"Runtime optional features state (snapshot):",
textwrap.indent("\n".join(diagnostics), " "),
]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ doc = [
]
test = [
"pytest>=8.0.0",
"runtime-introspect>=0.4.1",
]
concurrency = [
{ include-group = "test" },
Expand Down
17 changes: 16 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.