Skip to content

Console output text color missing when pytest run using xdist's -f option #454

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

Closed
pytestbot opened this issue Feb 9, 2014 · 5 comments
Closed
Labels
plugin: xdist related to the xdist external plugin type: enhancement new feature or API change, should be merged into features branch

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Jurko Gospodnetić (BitBucket: jurko, GitHub: jurko)


When running a test suite using pytest and its xdist plugin without using xdist's -f command-line option, red/green console output text color gets displayed correctly. However, when running the same test suite using the same pytest command-line options plus the additional -f command line (to loop on failure) - all output text gets displayed in regular gray color.

Environment:

#!text
Windows 7 x64 SP1
Python 2.7.6
pytest 2.5.1
pytest-xdist-1.9
regular Windows cmd.exe command prompt console

Hope this helps.

Best regards,
Jurko Gospodnetić


@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


it's a known limitation of the --looponfailing mode. Maybe @RonnyPfannschmidt can tell if his work on refactoring looponfail (IIRC) would fix that.

@pytestbot pytestbot added type: enhancement new feature or API change, should be merged into features branch plugin: xdist related to the xdist external plugin labels Jun 15, 2015
@nicoddemus
Copy link
Member

Seems related to #133

@RonnyPfannschmidt
Copy link
Member

different kinds of issue tho, this one cna be fixed after merging pytest-cache

since then looponfail can be implemented as a loop with a watch and plain subprocess invocations

@RonnyPfannschmidt
Copy link
Member

Closing as stalled, the looponfail mode will be removed from xdist soon

fkohlgrueber pushed a commit to fkohlgrueber/pytest that referenced this issue Oct 27, 2018
Fixes pytest-dev#452

I ended up making a couple of other normalizations to numeric literals
too (lowercase everything, don't allow leading or trailing . in floats,
remove redundant + sign in exponent). I don't care too much about those,
so I'm happy to change the behavior there.

For reference, here is Python's grammar for numeric literals:
https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
@dimaqq
Copy link

dimaqq commented Nov 25, 2021

For anyone who comes here looking for colours 🌈

pytest -vv -f --color=yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: xdist related to the xdist external plugin type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

4 participants