Skip to content

Preserve setup error records when failure handling aborts - #1030

Open
rksharma-owg wants to merge 1 commit into
google:masterfrom
rksharma-owg:codex/persist-setup-error-on-abort
Open

Preserve setup error records when failure handling aborts#1030
rksharma-owg wants to merge 1 commit into
google:masterfrom
rksharma-owg:codex/persist-setup-error-on-abort

Conversation

@rksharma-owg

Copy link
Copy Markdown

When on_fail raises TestAbortAll after a setup_class failure, the setup error is missing from test_summary.yaml. Expectation failures can also escape before the class error is added to the results.

Finalize and persist the setup record in finally blocks around the failure callback, so abort propagation still occurs after recording the original setup failure. This covers both raised exceptions and recorded expectation failures without changing normal callback ordering.

Validation:

  • Both regression cases failed against the original implementation and pass with this change.
  • tox: 825 passed, 2 skipped. The run emitted warnings, including missing local adb during snippet cleanup.
  • pyink --check .: passed for all 106 files.
  • git diff --check: passed.

Closes #1029.

Prepared with AI assistance; the reproduction and tests were executed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup_class error record is not written to test_summary.yaml when on_fail raises TestAbortAll

1 participant