-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Color percentage indicator #6107
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
Color percentage indicator #6107
Conversation
I'm aware I'm supposed to write tests before writing code, I just haven't (yet) figured out how to test this, sorry |
No worries, if you're lucky you can adjust an existing one. |
While working on this we should keep in mind to have it usable also for the "SKIPPED", "FAILED", "XFAIL", etc prefixes in the short test summary later. |
CI passes (except for the flaky hypothesis issue; restarted to get coverage at least maybe), so you need a new test. |
Thanks, I was wondering about the hypothesis issue. OK, I'll give that a go and will let you know |
464eef9
to
009c0b6
Compare
"*= ERRORS =*", | ||
"*_ ERROR collecting test_collecterror.py _*", | ||
"E SyntaxError: *", | ||
"*= short test summary info =*", | ||
"ERROR test_collecterror.py", | ||
"*! Interrupted: 1 errors during collection !*", | ||
"*! Interrupted: 1 error during collection !*", | ||
"*= 1 error in *", | ||
] | ||
) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
I've added tests with |
Yes. Although I think we should them more readable (via format strings for color escapes), so that it would use |
Ok, I've removed two of the tests and have kept the one that has all three colors in it (green, red, yellow). I've also added constants to make the tests more readable. Just realised that pytest-CI checks for Python 3.5 to work too, so no f-strings....I'll change this later today |
Nice! You also need a changelog then (see |
Thanks! Changelog added |
Thanks, will review it properly later - you could however squash and force-push it already (sorry, I'd like we could just do it here (#4361)). |
indicate current outcome/status with color of percentage indicator Fix type annotation, refactor _write_progress_information_filling_space Keep code in _get_main_color as similar as possible to how it was before Write test Make black-compliant Fix error in newly introduced test_collecterror Make tests more readable by using constants and f-strings Remove accidentally added monkeypatch Make Python 3.5-compatible, add changelog entry Add newline at the end of changelog file
e8b7a11
to
0d79061
Compare
Awesome! |
Fixes #6097.