Skip to content

Commit 4d5f112

Browse files
committed
feat(consume): append enginexfixture pre_hash field to testid if available
1 parent a34f78e commit 4d5f112

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pytest_plugins/consume/consume.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,15 @@ def pytest_generate_tests(metafunc):
422422
if test_case.format.format_name not in metafunc.config._supported_fixture_formats:
423423
continue
424424
fork_markers = get_relative_fork_markers(test_case.fork, strict_mode=False)
425+
426+
# Append pre_hash (first 8 chars) to test ID for easier selection with --sim.limit
427+
test_id = test_case.id
428+
if hasattr(test_case, "pre_hash") and test_case.pre_hash:
429+
test_id = f"{test_case.id}[{test_case.pre_hash[:8]}]"
430+
425431
param = pytest.param(
426432
test_case,
427-
id=test_case.id,
433+
id=test_id,
428434
marks=[getattr(pytest.mark, m) for m in fork_markers]
429435
+ [getattr(pytest.mark, test_case.format.format_name)]
430436
+ [pytest.mark.xdist_group(name=test_case.pre_hash)],

0 commit comments

Comments
 (0)