Skip to content

Report expected and actual values in the failure message - #32

Merged
Pitan-andela merged 1 commit into
masterfrom
cw-10-reporter-feedback
Nov 21, 2026
Merged

Pitan-andela merged 1 commit into
masterfrom
cw-10-reporter-feedback

Conversation

@Pitan-andela

Copy link
Copy Markdown
Collaborator

Community feedback on the Python 3.14 reporter (PR #31) was that the separate Expected, Actual and Location panels take up a lot of space, duplicate the values already in the red message, and that Location doesn't help solvers who can't see the tests.

This removes the panels. A failed comparison is now a single message, in the style of the C++ framework: the author's message, if any, then Expected: and Actual: lines with each value's repr.

<FAILED::>n = 5<:LF:>Expected: 'ab\ncx'<:LF:>Actual:   'ab\ncd'
  • assert_not_equals reports Expected: not X, and assert_approx_equals includes the margin with the expected value.
  • The Location panel is removed, including for bare assert failures, which still get the Assertion failed fallback message.
  • One "Test Passed" per passing assertion is unchanged, matching the old framework.
  • The output fixture tests no longer strip LOG events, so they fail if a panel reappears.

This replaces the old X should equal Y wording for every failing Python test. Multiline strings are shown as repr (escaped \n), as in the old framework, rather than as raw text in a panel.

Validation: all 42 tests pass on Linux AMD64 with CPython 3.14.6 and 3.8, and on macOS with 3.14 and 3.11. The Python 3.14 image needs to pin this revision before the change reaches Codewars.

@Pitan-andela
Pitan-andela merged commit 505a3dc into master Nov 21, 2026
8 checks passed
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.

1 participant