When I first tried the pre-release of the upcoming tox rewrite, I noticed tox itself has funky new colors - which I like a lot…

tox4

But what happened with the green dots for pytest'soutput?

You may recall, running the old tox or pytest directly, the dots would be green…

tox3

why has this changed

Honestly, I am not 100% sure.

But I know how to get the colors back.

All you need to do is changing this line commands = pytest {posargs} in your tox.ini, to this line commands = pytest {tty:--color=yes} {posargs}.

This forces pytest to produce colorful output, even when invoked without a tty attached. And this is possible the why - pytest is called internally in a different way? Maybe?

Here we go…

tox4 with color

further reading

You can read more about why it is actually a good thing that output is not always colored at https://no-color.org/.