Repository navigation
Show setup and teardown phases in short test summaries - #15273
Closed
ZXLyyds100 wants to merge 1 commit into
Closed
ZXLyyds100 wants to merge 1 commit into
ZXLyyds100 wants to merge 1 commit into
Conversation
Refs pytest-dev#1004. Co-authored-by: OpenAI Codex <noreply@openai.com>
Member
|
Ai misconduct |
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.
Summary
The short test summary now identifies setup and teardown errors with their
execution phase, for example
ERROR at teardown of ....This addresses the phase-labeling prerequisite described in #1004. It does
not change phase accounting or the separate question of whether passed call
results should remain in the final counts.
Changes
setuporteardownin_get_line_with_reprcrash_message.output, and the helper's call-phase compatibility.
Validation
All checks were run against pytest
mainata7b2446ee41a7298d3a0bc22c52f3b8bacae1566..venv/bin/python -m pytest -q testing/test_terminal.py: 241 passed, 1 skipped..venv/bin/python -m pytest -q testing/test_terminal.py testing/acceptance_test.py testing/python/fixtures.py testing/test_unittest.py: 658 passed, 12 skipped, 4 xfailed..venv/bin/python -m pytest -q: 4,703 passed, 52 skipped, 13 xfailed, 7 xpassed, 2 existing warnings.PRE_COMMIT_HOME=/tmp/codex-pytest-1004-precommit .venv/bin/pre-commit run --all-files --show-diff-on-failure: passed.SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST=9.0.0 .venv/bin/python -m build: sdist and wheel built successfully.git diff --check: passed.The before/after regression uses pytest's synthetic
pytesterfixture with atest that passes its call phase and a
teardown_functionthat raisesRuntimeError("teardown boom"). Before the change the short summary was:After the change it is:
No production service, external plugin, or user data was used.
Risk and unverified items
reports.
traceback rendering are intentionally unchanged.
Python/OS matrix remain pending.
AI assistance disclosure: OpenAI Codex assisted with investigation,
implementation, testing, and self-review. No independent human review is
claimed; the submitting account remains responsible for understanding and
responding to review feedback.
Checklist
Co-authored-bycommit trailer.AUTHORS.