-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn if py.test -k foo
finds no tests.
#500
Comments
Original comment by Jurko Gospodnetić (BitBucket: jurko, GitHub: jurko): +1 That could be flagged as an error (red) or a warning (yellow?). I guess asking for no tests to be run is not something you do on purpose. 😄 Note though that this is different from finding some tests but deciding to skip them, which should be definitely be considered a success. |
Original comment by Thomas Güttler (BitBucket: thomas-guettler, GitHub: thomas-guettler): I would prefer a warning color. AFAIK you use yellow. |
Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub): So I've rejected my own pull request. Given the other issue where changing the colour of the status bar was considered which was rejected as well. After some discussion the conclusion there was that the summary line should only ever be green and red, and red should only occur if there's an actual failure. Introducing more colours in general is something we don't really want to do either. In fact there was some discussion of changing colours to abstract things like "success", "error", "warning" but that would be an other issue. |
Original comment by Thomas Güttler (BitBucket: thomas-guettler, GitHub: thomas-guettler): Dear Floris, can you give me a hint how to implement this feature in a plugin? With feature I mean: Display a warning if "-k" selects no test. |
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42): Hi Floris, maybe we had a misunderstanding. The red/green distinction on the summary line referred to the issue of xfail/xpass which i think should not include the color. If no tests were run at all, i think we can consider showing an uncolored line because nothing either failed (red) or passed (green). Thomas, i guess you could implement something with the |
Original comment by Anatoly Bubenkov (BitBucket: bubenkoff, GitHub: bubenkoff): Recently we've got situation like:
so no tests were run at all (because of the exception) |
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42): OK, on twitter people also suggest to turn "no tests collected/ran" into an error. https://twitter.com/hpk42/status/519402228118216704 |
Original comment by Thomas Güttler (BitBucket: thomas-guettler, GitHub: thomas-guettler): Would be very nice if "py.test -k foo" finds no test you get some visual feedback. I want some visual feedback telling me: ** no tests found ** |
Original comment by Bruno Oliveira (BitBucket: nicoddemus, GitHub: nicoddemus): I haven't tried it, but I like the solution. :) |
Originally reported by: Thomas Güttler (BitBucket: thomas-guettler, GitHub: thomas-guettler)
I think it would be a good useability improvement, if py.test would
warn me, if
py.test -k foo
finds no test at all.I use version 2.5.2 and I see a green line, which indicates that all is good.
But if no tests was found, at least for me (interactive usage), it is a fault.
It would be nice to see a different color (not green) if no test was selected.
The text was updated successfully, but these errors were encountered: