summaryrefslogtreecommitdiff
path: root/Lib/test/test_cmd_line.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-07-31 16:33:56 +0100
committerGitHub <noreply@github.com>2022-07-31 16:33:56 +0100
commitaa37ffda29ac48fb2df5a7029ba2e626ecc45850 (patch)
tree748f6ebe2d1bcc3b34cf999b15c1618a9365597b /Lib/test/test_cmd_line.py
parent50b2261bdac98303087287b24eef96abd45a82f9 (diff)
downloadcpython-git-aa37ffda29ac48fb2df5a7029ba2e626ecc45850.tar.gz
bpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the command line (GH-28823)" (#94745)
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r--Lib/test/test_cmd_line.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index bc52bbdb0f..6446976395 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -105,17 +105,8 @@ class CmdLineTest(unittest.TestCase):
opts = get_xoptions()
self.assertEqual(opts, {})
- opts = get_xoptions('-Xno_debug_ranges', '-Xdev=1234')
- self.assertEqual(opts, {'no_debug_ranges': True, 'dev': '1234'})
-
- @unittest.skipIf(interpreter_requires_environment(),
- 'Cannot run -E tests when PYTHON env vars are required.')
- def test_unknown_xoptions(self):
- rc, out, err = assert_python_failure('-X', 'blech')
- self.assertIn(b'Unknown value for option -X', err)
- msg = b'Fatal Python error: Unknown value for option -X (see --help-xoptions)'
- self.assertEqual(err.splitlines().count(msg), 1)
- self.assertEqual(b'', out)
+ opts = get_xoptions('-Xa', '-Xb=c,d=e')
+ self.assertEqual(opts, {'a': True, 'b': 'c,d=e'})
def test_showrefcount(self):
def run_python(*args):