Skip to content

fix color handling in test runner#2729

Merged
davidism merged 1 commit intopallets:8.1.xfrom
Tyl13:fixes-2705
May 21, 2024
Merged

fix color handling in test runner#2729
davidism merged 1 commit intopallets:8.1.xfrom
Tyl13:fixes-2705

Conversation

@Tyl13
Copy link
Contributor

@Tyl13 Tyl13 commented May 21, 2024

When using CliRunner.invoke(), the isolation function was not mocking _compat.should_strip_ansi
in addition to the utils.should_strip_ansi. The _compat version is only called when on Windows machines which is why it was missed. Also changed the test_testing.py::test_with_color to no longer skip when on windows. This will ensure that future changes to the testing.py modules will not cause a regression back to previous behavior.

fixes #2705

Ensure each step in CONTRIBUTING.rst is complete, especially the following:

  • Add tests that demonstrate the correct behavior of the change. Tests
    should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.

@davidism davidism changed the title Fixes #2705 fix color handling in test runner May 21, 2024
@Tyl13 Tyl13 changed the title fix color handling in test runner fix color handling in test runner #2705 May 21, 2024
@Tyl13 Tyl13 changed the title fix color handling in test runner #2705 fix color handling in test runner May 21, 2024
@aenglander aenglander added this to the 8.1.8 milestone May 21, 2024
@aenglander aenglander linked an issue May 21, 2024 that may be closed by this pull request
@davidism davidism merged commit 5b1624b into pallets:8.1.x May 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting color=True in runner.invoke on windows strips ansi codes

3 participants