aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2024-04-24 21:25:22 +0100
committerGitHub <noreply@github.com>2024-04-24 21:25:22 +0100
commit345e1e04ec72698a1e257c805b3840d9f55eb80d (patch)
tree7a96eb0b69525fa33dd552b4ba952c4c857e3896 /Lib/test/test_threading.py
parent59a4d52973ca73bd739f914e88243a31dbef6b32 (diff)
downloadcpython-345e1e04ec72698a1e257c805b3840d9f55eb80d.tar.gz
cpython-345e1e04ec72698a1e257c805b3840d9f55eb80d.zip
gh-112730: Make the test suite resilient to color-activation environment variables (#117672)
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r--Lib/test/test_threading.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index a712ed10f02..362a3f9c4a0 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -7,6 +7,7 @@ from test.support import threading_helper, requires_subprocess
from test.support import verbose, cpython_only, os_helper
from test.support.import_helper import import_module
from test.support.script_helper import assert_python_ok, assert_python_failure
+from test.support import force_not_colorized
import random
import sys
@@ -1793,6 +1794,7 @@ class ExceptHookTests(BaseTestCase):
restore_default_excepthook(self)
super().setUp()
+ @force_not_colorized
def test_excepthook(self):
with support.captured_output("stderr") as stderr:
thread = ThreadRunFail(name="excepthook thread")
@@ -1806,6 +1808,7 @@ class ExceptHookTests(BaseTestCase):
self.assertIn('ValueError: run failed', stderr)
@support.cpython_only
+ @force_not_colorized
def test_excepthook_thread_None(self):
# threading.excepthook called with thread=None: log the thread
# identifier in this case.