chmp / ipytest

Pytest in IPython notebooks.
MIT License
314 stars 17 forks source link

Force colored output by default #56

Closed The-Compiler closed 3 years ago

The-Compiler commented 3 years ago

Before:

image

After:

image

chmp commented 3 years ago

Hey @The-Compiler.

Great idea. Thanks a lot already for the contirbution.

Couple of comments:

The-Compiler commented 3 years ago

Updated!

I don't see any issue for users - the main reason pytest disables its colored output is because it assumes that stdout is not a terminal. I'm guessing Jupyter Lab does something special to make this work when using !pytest, but not for "normal" cell output.

Perhaps for users with different color schemes or something it'd make the output harder to read? But that'd be a problem for them with e.g. colored terminal output as well, not just here.

chmp commented 3 years ago

@The-Compiler FYI: the Readme.md is autogenerated from the Readme.in I copied the changelog line into it.

Edit: gotta say .. Really cool seeing the color output. Thanks again :)