mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-112730: Make the test suite resilient to color-activation environment variables (#117672)
This commit is contained in:
parent
59a4d52973
commit
345e1e04ec
13 changed files with 89 additions and 16 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue