Skip to content

fix: clarify Python pytest failure messages - #24

Open
kbuffardi wants to merge 2 commits into
mainfrom
fix/clarify-python-outcomes
Open

fix: clarify Python pytest failure messages#24
kbuffardi wants to merge 2 commits into
mainfrom
fix/clarify-python-outcomes

Conversation

@kbuffardi

Copy link
Copy Markdown
Contributor

Closes #23

Summary

  • preserve custom assertion feedback without pytest framing
  • retain complete default pytest E-line diagnostics for assertions and exceptions
  • add dependency-free Node 16-compatible parser regressions
  • count pytest errors alongside failed tests

Testing

  • npm test

kbuffardi and others added 2 commits July 29, 2026 22:15
Keep custom assertion messages intact and retain default pytest diagnostics for failed Python tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the upstream Python error-handling contract while retaining detailed pytest failure diagnostics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves Python pytest result parsing so learners receive more constructive, non-truncated failure feedback (custom assertion messages and full E ... diagnostic lines), aligning with Issue #23’s request for clearer outcome messaging.

Changes:

  • Reworked parsePytestOutput to extract per-failure error message blocks (including multiline assertion details) and distinguish failures vs errors for counting.
  • Added dependency-free Node regression tests covering custom assertion messages, default assertion diffs, exceptions, multiple failures, collection errors, and mixed failure/error runs.
  • Updated npm test to run the new regression suite.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
executor.js Updates pytest output parsing to preserve detailed assertion/exception diagnostics and count errors alongside failures.
test/executor.test.js Adds Node-based regression tests for pytest parsing behavior across failure/error scenarios.
package.json Wires npm test to run the new regression tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread executor.js
assertionSource: '',
errorLines: [],
finishedErrors: false,
isError: /\bERROR\b/.test(failureHeader[1]),
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.

feat: clarify python outcome messaging

2 participants