mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
gh-112730: Make the test suite resilient to color-activation environment variables (#117672)
This commit is contained in:
parent
59a4d52973
commit
345e1e04ec
13 changed files with 89 additions and 16 deletions
|
@ -10,6 +10,7 @@ import textwrap
|
|||
import unittest
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
from test.support import force_not_colorized
|
||||
from test.support.script_helper import (
|
||||
spawn_python, kill_python, assert_python_ok, assert_python_failure,
|
||||
interpreter_requires_environment
|
||||
|
@ -1027,6 +1028,7 @@ class IgnoreEnvironmentTest(unittest.TestCase):
|
|||
|
||||
|
||||
class SyntaxErrorTests(unittest.TestCase):
|
||||
@force_not_colorized
|
||||
def check_string(self, code):
|
||||
proc = subprocess.run([sys.executable, "-"], input=code,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue