Skip to content

Capture assertion errors in pytest fixture.#372

Merged
ian-sift merged 2 commits into
mainfrom
test-results-context-improvements
Nov 7, 2025
Merged

Capture assertion errors in pytest fixture.#372
ian-sift merged 2 commits into
mainfrom
test-results-context-improvements

Conversation

@ian-sift
Copy link
Copy Markdown
Contributor

@ian-sift ian-sift commented Nov 7, 2025

Before:

  • Top level assertion failures were reported by pytest but not captured in report
Screenshot 2025-11-06 at 9 39 28 PM

After:

  • Top level assertion failures are now captured and will fail the report
Screenshot 2025-11-06 at 9 39 12 PM

The code used for test_top_level_report was just assert True == False. Removed that test from the CI test since there wasn't a good way to update the report for just that assertion failure successfully failing the test without instrumenting some complex hook just for it.

@ian-sift ian-sift merged commit 776f28b into main Nov 7, 2025
15 of 16 checks passed
@ian-sift ian-sift deleted the test-results-context-improvements branch November 7, 2025 21:28
nathan-sift added a commit that referenced this pull request Nov 10, 2025
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.

2 participants