Skip to content

Commit

Permalink
TST: add explicit mention of the GIL's state to pytest header
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Feb 8, 2025
1 parent f6df0d1 commit c8741d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from importlib.metadata import version
from importlib.util import find_spec

Expand Down Expand Up @@ -27,7 +28,10 @@ def pytest_runtest_setup(item):


def pytest_report_header(config, start_path):
is_gil_enabled = sys.version_info < (3, 13) or sys._is_gil_enabled()

return [
f"{is_gil_enabled = }",
f"NumPy: {version('numpy')}",
f"{gpgi._IS_PY_LIB = }",
f"gpgi._lib loads from {find_spec('gpgi._lib').origin}",
Expand Down

0 comments on commit c8741d6

Please sign in to comment.