{{ message }}
This repository was archived by the owner on Aug 24, 2026. It is now read-only.
Fix tests skipped during setup phase reporting with no result - #102
Merged
nprizal merged 1 commit intoApr 15, 2026
Merged
Conversation
Tests skipped via @pytest.mark.skip, @pytest.mark.skipif, or pytest.skip() in fixtures produce a setup-phase report with outcome="skipped". The logreport condition only captured setup failures, not setup skips, so the result stayed None and was omitted from the JSON payload — displayed as "unknown" in the UI. Also restructured the capture condition with clearer comments explaining when each phase's outcome is meaningful. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nprizal
marked this pull request as ready for review
April 13, 2026 23:00
Contributor
3 tasks
nprizal
deleted the
te-5406-test-doesnt-have-result-when-skipped-during-setup-phase
branch
April 15, 2026 00:43
3 tasks
Contributor
|
@jameshill @nprizal when is this change going to be released to pypi? |
Contributor
Author
|
Hi @jasonwbarnett, I will release this change today. |
Contributor
Author
pda
pushed a commit
to buildkite/bktest
that referenced
this pull request
Aug 24, 2026
…/te-5406-test-doesnt-have-result-when-skipped-during-setup-phase Fix tests skipped during setup phase reporting with no result
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Context
This was originally reported as a test-engine-client issue where
OnlyMutedFailures()returns false due to unrecognized test statuses. I traced the root cause back to the test collector itself.When a test is skipped during the setup phase (e.g. via
@pytest.mark.skip,@pytest.mark.skipif, orpytest.skip()in a fixture), the call phase never runs. Thepytest_runtest_logreporthook fires withreport.when="setup"andreport.outcome="skipped", but the existing condition only captured setup failures, not setup skips:This meant
update_test_resultwas never called, so the test'sresultstayedNone. When serialized to JSON, theresultkey was omitted entirely. The test-engine-client then treated this as"unknown", which broke the status accounting inRunResult.Status()and causedOnlyMutedFailures()to return false.Changes
"skipped"in the JSON payload, with a corresponding unit test.Test plan
test_pytest_runtest_logreport_skip_in_setuppasses--jsonoption on a test suite that includes@pytest.mark.skiptests and verify the JSON output contains"result": "skipped"for those tests