Repository navigation
Conversation
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
This branch has not been deployed
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.
With
junit_logging=allandjunit_log_passing_tests=false, a fixture setup error followed by a successful teardown produces an<error>in JUnit XML but loses the captured stdout, stderr, and logging output. The output is still present in the teardown report;write_captured_output()suppresses it because that individual phase passed.Keep captured output when the testcase already contains an error. Output is still written at teardown, so cleanup diagnostics are included without writing the setup output twice. The existing call-failure handling is unchanged. This covers a setup-error case left outside the call-phase fix in #6274 and reproduces without third-party plugins or interlaced reports.
The regression test covers both XML families, both values of
junit_log_passing_tests, and successful or failing cleanup. It checks that setup and teardown output from all three channels appears exactly once. Before the fix, the two setup-error/passing-teardown cases with logging suppression failed; the other six controls passed.Validation:
tox -e linting,py313: both environments passed. Python 3.13: 4701 passed, 51 skipped, 15 xfailed, 5 xpassed, 2 warnings.python -m pytest testing/test_junitxml.py -q: 159 passed on Python 3.12.Independent setup-error reproduction tests: 4 passed after the fix.
git diff --check: passed.Include regression tests.
Add the contributor to AUTHORS.
Allow maintainers to push and squash commits.
Add the changelog fragment
changelog/15196.bugfix.rst.Credit AI assistance in the commit's
Co-authored-bytrailer.Prepared with Codex assistance, including investigation, implementation, and test execution. The commit credits the assistance with a
Co-authored-bytrailer.