Repository navigation
test: drive verify end to end with real pytest and tgtrace in CI (#114) - #164
Merged
Merged
Conversation
Every other verify test fakes the pytest run, so tgtrace's hooks, the JUnit join and verify.run's trace handling were never exercised together; the unittest-with-pytest job installed pytest and ran a suite that never needed it. tests/test_verify_e2e.py builds a temp target repo whose committed diff selects J1 and runs verify.run with real pytest for each shape the audit fixed: pass 0, fail 1, skip in the body 3, xfail 3, setup error 1, parametrized id containing `::` 0, declared but never entering the journey 3. Skipped without pytest. Each case gets a fresh test file and no bytecode: a same-size rewrite within one second reused a stale .pyc. CI pins pytest==9.0.3 in that job, since the test asserts pytest's JUnit and nodeid shapes.
…en (#114 review) - H1: an unmarked red test beside the J1 test pins verify's `-m` journey filter; dropping it survived because every test covered J1. - H2: the unittest-with-pytest job sets TG_REQUIRE_PYTEST=1, and a presence test fails there if pytest is not importable instead of skipping the file into a green job. - H3: each case pins which path it took (credited / incomplete reason / uncovered / unvalidated), not just the exit code, since three paths all end in exit 3. - H4: the pytest subprocess gets PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 and an empty PYTEST_ADDOPTS, so a developer's `-n auto`, pytest-cov or pytest-randomly cannot change the run.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #114.
tests/test_verify_e2e.pybuilds a temp target repo whose committed diff selects J1, then runsverify.runwith real pytest and tgtrace for each shape the audit fixed: pass 0, fail 1, skip in the body 3, xfail 3, setup error 1, parametrized id containing::0, declared but never entering the journey 3. Each case also pins which path it took, not just its exit code.-mjourney filter.PYTEST_ADDOPTS.unittest-with-pytest, and that job setsTG_REQUIRE_PYTEST=1so a missing pytest fails it instead of skipping the file.Reviewed by /code-review and a code-reviewer agent (CI replica in a clean venv, 44 mutants). The four gaps that let the test stay green are fixed in f6ccfc2; the rest are filed as #163.