mirror of
https://github.com/python/cpython.git
synced 2025-10-26 19:24:34 +00:00
gh-127873: Only check sys.flags.ignore_environment for PYTHON* env vars (#127877)
This commit is contained in:
parent
13475e0a5a
commit
05d12eecbd
22 changed files with 94 additions and 65 deletions
|
|
@ -4,10 +4,10 @@
|
|||
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 @@ def run(self, test):
|
|||
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 @@ def test_NonExit(self):
|
|||
'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 @@ def test_Exit(self):
|
|||
'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 @@ def test_ExitAsDefault(self):
|
|||
'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 @@ def test_ExitSkippedSuite(self):
|
|||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue