[3.13] gh-127873: Only check sys.flags.ignore_environment for PYTHON* env vars (GH-127877) (#129138)

This commit is contained in:
Hugo van Kemenade 2025-01-22 21:09:51 +02:00 committed by GitHub
parent f7f8b8b758
commit cc3dc8ab24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 91 additions and 28 deletions

View file

@ -106,6 +106,7 @@ class TestCleanUp(unittest.TestCase):
self.assertTrue(test.doCleanups())
self.assertEqual(cleanups, [(2, (), {}), (1, (1, 2, 3), dict(four='hello', five='goodbye'))])
@support.force_not_colorized
def testCleanUpWithErrors(self):
class TestableTest(unittest.TestCase):
def testNothing(self):
@ -249,6 +250,7 @@ class TestCleanUp(unittest.TestCase):
self.assertEqual(test._cleanups, [])
@support.force_not_colorized_test_class
class TestClassCleanup(unittest.TestCase):
def test_addClassCleanUp(self):
class TestableTest(unittest.TestCase):
@ -601,6 +603,7 @@ class TestClassCleanup(unittest.TestCase):
self.assertIn("\nNO TESTS RAN\n", runner.stream.getvalue())
@support.force_not_colorized_test_class
class TestModuleCleanUp(unittest.TestCase):
def test_add_and_do_ModuleCleanup(self):
module_cleanups = []
@ -1318,6 +1321,7 @@ class Test_TextTestRunner(unittest.TestCase):
expectedresult = (runner.stream, DESCRIPTIONS, VERBOSITY)
self.assertEqual(runner._makeResult(), expectedresult)
@support.force_not_colorized
@support.requires_subprocess()
def test_warnings(self):
"""