21
21
from test .support .os_helper import TESTFN , unlink
22
22
from test .support .script_helper import assert_python_ok , assert_python_failure
23
23
from 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
25
25
26
26
import json
27
27
import textwrap
@@ -1712,6 +1712,7 @@ def f():
1712
1712
1713
1713
1714
1714
@requires_debug_ranges ()
1715
+ @force_not_colorized_test_class
1715
1716
class PurePythonTracebackErrorCaretTests (
1716
1717
PurePythonExceptionFormattingMixin ,
1717
1718
TracebackErrorLocationCaretTestBase ,
@@ -1725,6 +1726,7 @@ class PurePythonTracebackErrorCaretTests(
1725
1726
1726
1727
@cpython_only
1727
1728
@requires_debug_ranges ()
1729
+ @force_not_colorized_test_class
1728
1730
class CPythonTracebackErrorCaretTests (
1729
1731
CAPIExceptionFormattingMixin ,
1730
1732
TracebackErrorLocationCaretTestBase ,
@@ -1736,6 +1738,7 @@ class CPythonTracebackErrorCaretTests(
1736
1738
1737
1739
@cpython_only
1738
1740
@requires_debug_ranges ()
1741
+ @force_not_colorized_test_class
1739
1742
class CPythonTracebackLegacyErrorCaretTests (
1740
1743
CAPIExceptionFormattingLegacyMixin ,
1741
1744
TracebackErrorLocationCaretTestBase ,
@@ -2149,10 +2152,12 @@ def test_print_exception_bad_type_python(self):
2149
2152
boundaries = re .compile (
2150
2153
'(%s|%s)' % (re .escape (cause_message ), re .escape (context_message )))
2151
2154
2155
+ @force_not_colorized_test_class
2152
2156
class TestTracebackFormat (unittest .TestCase , TracebackFormatMixin ):
2153
2157
pass
2154
2158
2155
2159
@cpython_only
2160
+ @force_not_colorized_test_class
2156
2161
class TestFallbackTracebackFormat (unittest .TestCase , TracebackFormatMixin ):
2157
2162
DEBUG_RANGES = False
2158
2163
def setUp (self ) -> None :
@@ -2940,6 +2945,7 @@ def f():
2940
2945
self .assertEqual (report , expected )
2941
2946
2942
2947
2948
+ @force_not_colorized_test_class
2943
2949
class PyExcReportingTests (BaseExceptionReportingTests , unittest .TestCase ):
2944
2950
#
2945
2951
# This checks reporting through the 'traceback' module, with both
@@ -2956,6 +2962,7 @@ def get_report(self, e):
2956
2962
return s
2957
2963
2958
2964
2965
+ @force_not_colorized_test_class
2959
2966
class CExcReportingTests (BaseExceptionReportingTests , unittest .TestCase ):
2960
2967
#
2961
2968
# This checks built-in reporting by the interpreter.
0 commit comments