summaryrefslogtreecommitdiffstats
path: root/Lib/test/test__colorize.py
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-03-16 13:09:33 (GMT)
committerGitHub <noreply@github.com>2025-03-16 13:09:33 (GMT)
commit3185e3115c918ec189e16cf9f5b51a13a0146556 (patch)
tree4a773847ee275359ae58832afea1071858e539af /Lib/test/test__colorize.py
parent9558d22ac308c102e4f843541eead2022050225e (diff)
downloadcpython-3185e3115c918ec189e16cf9f5b51a13a0146556.zip
cpython-3185e3115c918ec189e16cf9f5b51a13a0146556.tar.gz
cpython-3185e3115c918ec189e16cf9f5b51a13a0146556.tar.bz2
gh-131277: allow `EnvironmentVarGuard` to unset more than one environment variable at once (#131280)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test__colorize.py')
-rw-r--r--Lib/test/test__colorize.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test__colorize.py b/Lib/test/test__colorize.py
index 42ee7b5..b2f0bb1 100644
--- a/Lib/test/test__colorize.py
+++ b/Lib/test/test__colorize.py
@@ -10,8 +10,7 @@ from test.support.os_helper import EnvironmentVarGuard
@contextlib.contextmanager
def clear_env():
with EnvironmentVarGuard() as mock_env:
- for var in "FORCE_COLOR", "NO_COLOR", "PYTHON_COLORS", "TERM":
- mock_env.unset(var)
+ mock_env.unset("FORCE_COLOR", "NO_COLOR", "PYTHON_COLORS", "TERM")
yield mock_env