Skip to content

Commit 064eeba

Browse files
Add PyTest IDs for better readability and filtering (#409)
* Added additional local .gitignores and pytest.ini options * Added test names * Update tests/conftest.py fix linting error * Update tests/conftest.py trying again to fix linting * fix trailing comma * revert gitignore and pyproject.toml changes * Update tests/conftest.py --------- Co-authored-by: Chris Kucharczyk <chris@drivendata.org> Co-authored-by: Chris Kucharczyk <chris.kucharczyk@gmail.com>
1 parent 9a754f5 commit 064eeba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,14 @@ def fast(request):
106106

107107
def pytest_generate_tests(metafunc):
108108
# setup config fixture to get all of the results from config_generator
109+
def make_test_id(config):
110+
return f"{config['environment_manager']}-{config['dependency_file']}-{config['pydata_packages']}"
111+
109112
if "config" in metafunc.fixturenames:
110113
metafunc.parametrize(
111-
"config", config_generator(metafunc.config.getoption("fast"))
114+
"config",
115+
config_generator(metafunc.config.getoption("fast")),
116+
ids=make_test_id,
112117
)
113118

114119

0 commit comments

Comments
 (0)