bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)

This commit is contained in:
Pablo Galindo Salgado 2021-10-13 18:08:19 +01:00 committed by GitHub
parent 1c83135381
commit db2b6a20cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 88 additions and 27 deletions

View file

@ -18,7 +18,7 @@ AUDIT_TESTS_PY = support.findfile("audit-tests.py")
class AuditTest(unittest.TestCase):
def do_test(self, *args):
with subprocess.Popen(
[sys.executable, "-X utf8", AUDIT_TESTS_PY, *args],
[sys.executable, "-Xutf8", AUDIT_TESTS_PY, *args],
encoding="utf-8",
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
@ -32,7 +32,7 @@ class AuditTest(unittest.TestCase):
def run_python(self, *args):
events = []
with subprocess.Popen(
[sys.executable, "-X utf8", AUDIT_TESTS_PY, *args],
[sys.executable, "-Xutf8", AUDIT_TESTS_PY, *args],
encoding="utf-8",
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,