-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #379 from neutrinoceros/bld/include_conftest_sdist
BLD: ensure conftest.py is included in source distributions
- Loading branch information
Showing
4 changed files
with
66 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sys | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
DATA_DIR = Path(__file__).parents[1] / "lib" / "inifix" / "tests" / "data" | ||
INIFILES_PATHS = list(DATA_DIR.glob("*.ini")) + list(DATA_DIR.glob("*.cfg")) | ||
INIFILES_IDS = [inifile.name[:-4] for inifile in INIFILES_PATHS] | ||
|
||
INIFILES = dict(zip(INIFILES_PATHS, INIFILES_IDS, strict=True)) | ||
|
||
|
||
@pytest.fixture() | ||
def datadir_root(): | ||
return DATA_DIR | ||
|
||
|
||
@pytest.fixture(params=INIFILES.keys(), ids=INIFILES.values()) | ||
def inifile_root(request): | ||
return request.param | ||
|
||
|
||
def pytest_report_header(config, start_path): | ||
if sys.version_info >= (3, 13): | ||
is_gil_enabled = sys._is_gil_enabled() | ||
else: | ||
is_gil_enabled = True | ||
|
||
return [ | ||
f"{is_gil_enabled = }", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters