Repository navigation
Fix TAP-Y/J crash on an exception with no usable backtrace - #16
Merged
Merged
Conversation
The reporters asked for the source snippet of every failed, errored or pending test's exception, and raised NoMethodError when there was none: that is, when every backtrace line belonged to the test framework, as with Lemon's "not tested" pending tests. The run ended early and the counts were wrong. The record now carries the message alone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merged
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.
rubytest -yand-jraisedNoMethodError: undefined method 'file' for nilfor a failed, errored or pending test whose exception had no backtrace line outside the test framework. The run then ended early with wrong counts.Lemon produces such an exception when a test doesn't call the method it covers ("upcase not tested"), so a Lemon suite with a pending test of that kind hit this. Found while running tapout's reporters against rubytest 0.11.0. The other reporters (dotprogress, progress, outline, summary, tap, html) already handled it.
The record now has the exception's message without
file,line,sourceandsnippet.A demo step covers it;
qedpasses (6 demos, 48 steps) on Ruby 3.4.9.🤖 Generated with Claude Code