diff options
author | Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> | 2025-01-21 16:10:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-21 16:10:08 (GMT) |
commit | 05d12eecbde1ace39826320cadf8e673d709b229 (patch) | |
tree | 2e767c71374e498d1f9759e2ba60177152b396d0 /Lib/test/test_unittest/test_program.py | |
parent | 13475e0a5a317fa61f302f030b0effcb021873d6 (diff) | |
download | cpython-05d12eecbde1ace39826320cadf8e673d709b229.zip cpython-05d12eecbde1ace39826320cadf8e673d709b229.tar.gz cpython-05d12eecbde1ace39826320cadf8e673d709b229.tar.bz2 |
gh-127873: Only check `sys.flags.ignore_environment` for `PYTHON*` env vars (#127877)
Diffstat (limited to 'Lib/test/test_unittest/test_program.py')
-rw-r--r-- | Lib/test/test_unittest/test_program.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_unittest/test_program.py b/Lib/test/test_unittest/test_program.py index 58d0cef..6092ed2 100644 --- a/Lib/test/test_unittest/test_program.py +++ b/Lib/test/test_unittest/test_program.py @@ -4,10 +4,10 @@ import subprocess from test import support import unittest import test.test_unittest -from test.support import force_not_colorized from test.test_unittest.test_result import BufferedWriter +@support.force_not_colorized_test_class class Test_TestProgram(unittest.TestCase): def test_discovery_from_dotted_path(self): @@ -121,7 +121,6 @@ class Test_TestProgram(unittest.TestCase): self.assertEqual(['test.test_unittest', 'test.test_unittest2'], program.testNames) - @force_not_colorized def test_NonExit(self): stream = BufferedWriter() program = unittest.main(exit=False, @@ -137,7 +136,6 @@ class Test_TestProgram(unittest.TestCase): 'expected failures=1, unexpected successes=1)\n') self.assertEndsWith(out, expected) - @force_not_colorized def test_Exit(self): stream = BufferedWriter() with self.assertRaises(SystemExit) as cm: @@ -155,7 +153,6 @@ class Test_TestProgram(unittest.TestCase): 'expected failures=1, unexpected successes=1)\n') self.assertEndsWith(out, expected) - @force_not_colorized def test_ExitAsDefault(self): stream = BufferedWriter() with self.assertRaises(SystemExit): @@ -171,7 +168,6 @@ class Test_TestProgram(unittest.TestCase): 'expected failures=1, unexpected successes=1)\n') self.assertEndsWith(out, expected) - @force_not_colorized def test_ExitSkippedSuite(self): stream = BufferedWriter() with self.assertRaises(SystemExit) as cm: @@ -184,7 +180,6 @@ class Test_TestProgram(unittest.TestCase): expected = '\n\nOK (skipped=1)\n' self.assertEndsWith(out, expected) - @force_not_colorized def test_ExitEmptySuite(self): stream = BufferedWriter() with self.assertRaises(SystemExit) as cm: |