-
Notifications
You must be signed in to change notification settings - Fork 96
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
Have at least one separator in sep() #204
Have at least one separator in sep() #204
Conversation
Before: ``` 1 failed, 1 passed, 1 skipped, 1 deselected, 1 xfailed, 1 xpassed, 1 error in 0.04 seconds ``` After: ``` = 1 failed, 1 passed, 1 skipped, 1 deselected, 1 xfailed, 1 xpassed, 1 error in 0.04 seconds = ```
i cant wait to kill the pylib dependency of terminal-writer ^^ |
question - how does this affect normal terminal output? if this triggers line-wraps of separator lines for single separators, then its absolutely unacceptable |
as for a solution - if that is the case - we could opt in or out based on whether its a tty - but it would trigger inconsistent line lengths |
This change can cause more wrapping, but I think the consistency in output is worth it. Here's a small demo: from py.io import TerminalWriter
tw = TerminalWriter()
for i in range(70, 82):
msg = f'{i} chars: '
msg += 'X' * (i - len(msg))
tw.sep('=', msg)
print() beforeSome notably bad actors:
after |
basically, the only time this is going to make a difference is when the centered string is |
@asottile this is about as bad as rubbing my ocd with napalm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it also solves a pytest issue that's hidden somewhere about no longer being able to distinguish certain things
oh right, I don't have merge or release privs here 🙃 |
Before:
After:
This is slightly selfish -- I'm doing this to make the output in this case possible to colorize for pygments-pytest