Skip to content

Commit

Permalink
test runner handles color on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyl13 authored and davidism committed May 21, 2024
1 parent d3e3852 commit d83868a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Unreleased
multiple lines. :issue:`2697`
- Fixed issue that prevented a default value of ``""`` from being displayed in
the help for an option. :issue:`2500`
- The test runner handles stripping color consistently on Windows.
:issue:`2705`


Version 8.1.7
Expand Down
2 changes: 2 additions & 0 deletions src/click/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import typing as t
from types import TracebackType

from . import _compat
from . import formatting
from . import termui
from . import utils
Expand Down Expand Up @@ -315,6 +316,7 @@ def should_strip_ansi(
termui.hidden_prompt_func = hidden_input
termui._getchar = _getchar
utils.should_strip_ansi = should_strip_ansi # type: ignore
_compat.should_strip_ansi = should_strip_ansi

old_env = {}
try:
Expand Down
2 changes: 0 additions & 2 deletions tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest

import click
from click._compat import WIN
from click.testing import CliRunner


Expand Down Expand Up @@ -184,7 +183,6 @@ def cli():
assert result.exit_code == 1


@pytest.mark.skipif(WIN, reason="Test does not make sense on Windows.")
def test_with_color():
@click.command()
def cli():
Expand Down

0 comments on commit d83868a

Please sign in to comment.