Request: Do not display backtrace on SKIP #109

Closed
leehambley opened this Issue Nov 19, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@leehambley

It must be possible (but I couldn't find out how) to not display a backtrace when a test is skipped.

I see that Skip appears to be implemented as a error that is raised, and thus it would appear to trigger the same sort of code paths, I tried to examine how to improve that code, but I didn't have a lot of time to invest.

I'm throwing this issue request out there in the hope that someone with a better knowledge of the code can jump to a possible solution more quickly than I might.

@trans

This comment has been minimized.

Show comment Hide comment
@trans

trans Nov 25, 2012

Contributor

You are probably right that we don't need to show a backtrace for skipped tests. I'll have a look. But as this isn't as pressing as some of the other issues, I'm going to hold off on this until the release after next. In them meantime, if anyone else would like to tackle it, feel free.

Contributor

trans commented Nov 25, 2012

You are probably right that we don't need to show a backtrace for skipped tests. I'll have a look. But as this isn't as pressing as some of the other issues, I'm going to hold off on this until the release after next. In them meantime, if anyone else would like to tackle it, feel free.

@leehambley

This comment has been minimized.

Show comment Hide comment
@leehambley

leehambley Dec 1, 2012

Could you point me in the right direction, just a hint (I did try and find it myself) and I'd be more than happy to find the code and make a patch with tests.

Could you point me in the right direction, just a hint (I did try and find it myself) and I'd be more than happy to find the code and make a patch with tests.

@trans

This comment has been minimized.

Show comment Hide comment
@trans

trans Dec 1, 2012

Contributor

Sure. This is the default reporter: https://github.com/TwP/turn/blob/master/lib/turn/reporters/pretty_reporter.rb. Notice that skip() calls prettify(). I think you are suggesting that skip() act like pass() instead.

Of course, we must consider first, do we really want to differentiate skip from the others (i.e. fail and error)? Are we sure we want to do this? Skip is usually meant to denote a "todo", so it helps to know where it is. So, if we do this, I would suggest two things: Allow a --verbose option to let it fallback to what it does now, and provide file and line number with the output message. Make sense?

Contributor

trans commented Dec 1, 2012

Sure. This is the default reporter: https://github.com/TwP/turn/blob/master/lib/turn/reporters/pretty_reporter.rb. Notice that skip() calls prettify(). I think you are suggesting that skip() act like pass() instead.

Of course, we must consider first, do we really want to differentiate skip from the others (i.e. fail and error)? Are we sure we want to do this? Skip is usually meant to denote a "todo", so it helps to know where it is. So, if we do this, I would suggest two things: Allow a --verbose option to let it fallback to what it does now, and provide file and line number with the output message. Make sense?

@leehambley

This comment has been minimized.

Show comment Hide comment
@leehambley

leehambley Dec 4, 2012

Thank you for the guidance @trans, I've implemented the simplest thing to keep my team sane in my fork, nothing beautiful, but the patch is at leehambley/turn@9aef9d8. I look forward to having some more time to address this issue a bit more fully, I'll close for the time being, and try and come back and make a more widely acceptable patch, including the option to re-enable the backtrace.

Thank you for the guidance @trans, I've implemented the simplest thing to keep my team sane in my fork, nothing beautiful, but the patch is at leehambley/turn@9aef9d8. I look forward to having some more time to address this issue a bit more fully, I'll close for the time being, and try and come back and make a more widely acceptable patch, including the option to re-enable the backtrace.

@leehambley leehambley closed this Dec 4, 2012

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