2121from test .support .os_helper import TESTFN , unlink
2222from test .support .script_helper import assert_python_ok , assert_python_failure
2323from test .support .import_helper import forget
24- from test .support import force_not_colorized
24+ from test .support import force_not_colorized , force_not_colorized_test_class
2525
2626import json
2727import textwrap
@@ -1712,6 +1712,7 @@ def f():
17121712
17131713
17141714@requires_debug_ranges ()
1715+ @force_not_colorized_test_class
17151716class PurePythonTracebackErrorCaretTests (
17161717 PurePythonExceptionFormattingMixin ,
17171718 TracebackErrorLocationCaretTestBase ,
@@ -1725,6 +1726,7 @@ class PurePythonTracebackErrorCaretTests(
17251726
17261727@cpython_only
17271728@requires_debug_ranges ()
1729+ @force_not_colorized_test_class
17281730class CPythonTracebackErrorCaretTests (
17291731 CAPIExceptionFormattingMixin ,
17301732 TracebackErrorLocationCaretTestBase ,
@@ -1736,6 +1738,7 @@ class CPythonTracebackErrorCaretTests(
17361738
17371739@cpython_only
17381740@requires_debug_ranges ()
1741+ @force_not_colorized_test_class
17391742class CPythonTracebackLegacyErrorCaretTests (
17401743 CAPIExceptionFormattingLegacyMixin ,
17411744 TracebackErrorLocationCaretTestBase ,
@@ -2149,10 +2152,12 @@ def test_print_exception_bad_type_python(self):
21492152boundaries = re .compile (
21502153 '(%s|%s)' % (re .escape (cause_message ), re .escape (context_message )))
21512154
2155+ @force_not_colorized_test_class
21522156class TestTracebackFormat (unittest .TestCase , TracebackFormatMixin ):
21532157 pass
21542158
21552159@cpython_only
2160+ @force_not_colorized_test_class
21562161class TestFallbackTracebackFormat (unittest .TestCase , TracebackFormatMixin ):
21572162 DEBUG_RANGES = False
21582163 def setUp (self ) -> None :
@@ -2940,6 +2945,7 @@ def f():
29402945 self .assertEqual (report , expected )
29412946
29422947
2948+ @force_not_colorized_test_class
29432949class PyExcReportingTests (BaseExceptionReportingTests , unittest .TestCase ):
29442950 #
29452951 # This checks reporting through the 'traceback' module, with both
@@ -2956,6 +2962,7 @@ def get_report(self, e):
29562962 return s
29572963
29582964
2965+ @force_not_colorized_test_class
29592966class CExcReportingTests (BaseExceptionReportingTests , unittest .TestCase ):
29602967 #
29612968 # This checks built-in reporting by the interpreter.
0 commit comments