Skip to content

Commit

Permalink
Fix missing reset in isolation function (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism authored Dec 4, 2024
2 parents 9ce8bd8 + ffd43e9 commit fdc6b02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Unreleased
:issue:`2452`
- Refactor code generating default ``--help`` option to deduplicate code.
:pr:`2563`
- Test ``CLIRunner`` resets patched ``_compat.should_strip_ansi``.
:issue:`2732`


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 @@ -312,6 +312,7 @@ def should_strip_ansi(
old_hidden_prompt_func = termui.hidden_prompt_func
old__getchar_func = termui._getchar
old_should_strip_ansi = utils.should_strip_ansi # type: ignore
old__compat_should_strip_ansi = _compat.should_strip_ansi
termui.visible_prompt_func = visible_input
termui.hidden_prompt_func = hidden_input
termui._getchar = _getchar
Expand Down Expand Up @@ -346,6 +347,7 @@ def should_strip_ansi(
termui.hidden_prompt_func = old_hidden_prompt_func
termui._getchar = old__getchar_func
utils.should_strip_ansi = old_should_strip_ansi # type: ignore
_compat.should_strip_ansi = old__compat_should_strip_ansi
formatting.FORCED_WIDTH = old_forced_width

def invoke(
Expand Down

0 comments on commit fdc6b02

Please sign in to comment.