diff --git a/Lib/test/test__colorize.py b/Lib/test/test__colorize.py index 056a5306ced..42ee7b50a2a 100644 --- a/Lib/test/test__colorize.py +++ b/Lib/test/test__colorize.py @@ -10,7 +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": + for var in "FORCE_COLOR", "NO_COLOR", "PYTHON_COLORS", "TERM": mock_env.unset(var) yield mock_env diff --git a/Misc/NEWS.d/next/Tests/2025-02-20-13-39-12.gh-issue-130293.5igSsu.rst b/Misc/NEWS.d/next/Tests/2025-02-20-13-39-12.gh-issue-130293.5igSsu.rst new file mode 100644 index 00000000000..40c1784f6f1 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2025-02-20-13-39-12.gh-issue-130293.5igSsu.rst @@ -0,0 +1,2 @@ +The tests of terminal colorization are no longer sensitive to the value of +the ``TERM`` variable in the testing environment. diff --git a/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m b/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m index 6db38253396..dd6e76f9496 100644 --- a/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m +++ b/iOS/testbed/iOSTestbedTests/iOSTestbedTests.m @@ -28,7 +28,7 @@ // Xcode log can't display color. Stdout will report that it is *not* a // TTY. setenv("NO_COLOR", "1", true); - setenv("PY_COLORS", "0", true); + setenv("PYTHON_COLORS", "0", true); // Arguments to pass into the test suite runner. // argv[0] must identify the process; any subsequent arg