Skip to content

Conversation

@keewis
Copy link
Contributor

@keewis keewis commented Sep 14, 2025

pytest somewhat recently has started to also add colours to the diffs of built-in structures (like dict or list), which means we see the escape codes in the created issue (setting the CI env var usually disables colours, but at least in the projects I work on we set FORCE_COLORS because it makes reading the output a lot easier).

To avoid that, we strip the escape sequences here.

Ideally I'd want to have pytest-reportlog do this for us (after all, reportlog is designed to be machine-readable), but this would take a while to roll out.

@keewis
Copy link
Contributor Author

keewis commented Sep 14, 2025

I've created pytest-dev/pytest-reportlog#83 to hopefully fix this within either pytest-reportlog or pytest

@keewis keewis merged commit 79fd4d3 into scientific-python:main Sep 14, 2025
4 checks passed
@keewis keewis deleted the strip-ansi branch September 14, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant