mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #18338: python --version
now prints version string to stdout, and
not to stderr. Patch by Berker Peksag and Michael Dickens.
This commit is contained in:
parent
e173d01231
commit
e3ed4edb94
3 changed files with 8 additions and 3 deletions
|
@ -41,8 +41,10 @@ class CmdLineTest(unittest.TestCase):
|
|||
|
||||
def test_version(self):
|
||||
version = ('Python %d.%d' % sys.version_info[:2]).encode("ascii")
|
||||
rc, out, err = assert_python_ok('-V')
|
||||
self.assertTrue(err.startswith(version))
|
||||
for switch in '-V', '--version':
|
||||
rc, out, err = assert_python_ok(switch)
|
||||
self.assertFalse(err.startswith(version))
|
||||
self.assertTrue(out.startswith(version))
|
||||
|
||||
def test_verbose(self):
|
||||
# -v causes imports to write to stderr. If the write to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue