ruff icon indicating copy to clipboard operation
ruff copied to clipboard

[red-knot] mdtest output in CI isn't colourised

Open AlexWaygood opened this issue 1 year ago • 0 comments

If you run cargo test -p red_knot_python_semantic locally and an mdtest fails, you get nice pretty colours that make the test output much more readable, eg.:

image

But if you run cargo test (rather than cargo test -p red_knot_python_semantic) or cargo nextest (which is what we do in CI), the output isn't colourised, which makes the output much harder to read: https://github.com/astral-sh/ruff/actions/runs/11530541010/job/32100248614?pr=13918

This is because some of the other crates enable the "no_color" feature of the colored dependency, which is how we add colours to the output of mdtest: https://github.com/astral-sh/ruff/blob/b6ffa51c164e3898862c565ec860bbca928ddee9/crates/ruff_linter/Cargo.toml#L77-L78

When you run all the tests together, that feature ends up being enabled, meaning no mdtest colours. It would be great if we could see if there was a way of having coloured output for mdtest in CI without breaking the tests for those other crates.

AlexWaygood avatar Oct 26 '24 18:10 AlexWaygood