Skip to content
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

tox -p suppresses color output #2070

Closed
pbelskiy opened this issue May 26, 2021 · 4 comments
Closed

tox -p suppresses color output #2070

pbelskiy opened this issue May 26, 2021 · 4 comments
Labels
bug:normal affects many people or has quite an impact

Comments

@pbelskiy
Copy link

Hello!

Is it possible to print colorful error output when running tox in parallel? Same tox behavior on my previous and current version (3.23.1)

@pbelskiy pbelskiy added the bug:normal affects many people or has quite an impact label May 26, 2021
@jugmac00
Copy link
Member

Hi @pbelskiy, I do not understand - I am on tox 3.23.1 and I see the failed runs in red color.

Screenshot from 2021-05-26 14-02-41

Could you please tell us in which version of tox you have problems and in which you had no problems?

Could you also please provide screenshots?

Thank you!

@pbelskiy
Copy link
Author

@jugmac00 I meant no color when error in traceback output and ERROR INFO keyword highlighting etc

@jugmac00
Copy link
Member

Thanks for clarifying!

single env

Screenshot from 2021-05-27 11-44-01

parallel mode

Screenshot from 2021-05-27 11-45-10

Interestingly, on the tox-rewrite branch for the upcoming tox4, there is no color by default for single envs...
Screenshot from 2021-05-27 11-53-26

And in parallel there are no tracebacks shown at all!

Screenshot from 2021-05-27 11-54-54

@gaborbernat
Copy link
Member

Ah, yeah. So the issue isn't that tox suppresses the color output, rather than the tools in question don't generate colored output when not invoked with a tty attached. You can force them to do so by using the tty substitution, e.g. on tox itself and rewrite branch https://github.com/tox-dev/tox/blob/rewrite/tox.ini#L28

Now as far as not needing this workaround we're looking at issue #1773. This being a duplicate of that. I don't think we'd change it for tox 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

No branches or pull requests

3 participants