mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
#16306: merge with 3.3.
This commit is contained in:
commit
195ad6ce05
4 changed files with 17 additions and 6 deletions
|
@ -7,7 +7,8 @@ import os
|
|||
import sys
|
||||
import subprocess
|
||||
import tempfile
|
||||
from test.script_helper import spawn_python, kill_python, assert_python_ok, assert_python_failure
|
||||
from test.script_helper import (spawn_python, kill_python, assert_python_ok,
|
||||
assert_python_failure)
|
||||
|
||||
|
||||
# XXX (ncoghlan): Move to script_helper and make consistent with run_python
|
||||
|
@ -387,6 +388,12 @@ class CmdLineTest(unittest.TestCase):
|
|||
assert_python_ok(filename)
|
||||
|
||||
|
||||
def test_unknown_options(self):
|
||||
rc, out, err = assert_python_failure('-z', __cleanenv=True)
|
||||
self.assertIn(b'Unknown option', err)
|
||||
self.assertEqual(err.splitlines().count(b'Unknown option: -z'), 1)
|
||||
self.assertEqual(b'', out)
|
||||
|
||||
def test_main():
|
||||
test.support.run_unittest(CmdLineTest)
|
||||
test.support.reap_children()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue