gh-112730: Make the test suite resilient to color-activation environment variables (#117672)

This commit is contained in:
Pablo Galindo Salgado 2024-04-24 21:25:22 +01:00 committed by GitHub
parent 59a4d52973
commit 345e1e04ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 89 additions and 16 deletions

View file

@ -12,6 +12,7 @@
_interpreters = import_helper.import_module('_interpreters')
from test.support import Py_GIL_DISABLED
from test.support import interpreters
from test.support import force_not_colorized
from test.support.interpreters import (
InterpreterError, InterpreterNotFoundError, ExecutionFailed,
)
@ -735,6 +736,7 @@ def test_failure(self):
with self.assertRaises(ExecutionFailed):
interp.exec('raise Exception')
@force_not_colorized
def test_display_preserved_exception(self):
tempdir = self.temp_dir()
modfile = self.make_module('spam', tempdir, text="""