diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-09-09 00:28:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 00:28:02 (GMT) |
commit | 58de1dd6a8677bd213802c19204b827cb7134695 (patch) | |
tree | 05a0e8d57ce76a55f0817ec278435790dbb9ae22 /Lib/test/test_cmd_line.py | |
parent | 594f0ce73be807c0fecf958dc0644fa37983f5fe (diff) | |
download | cpython-58de1dd6a8677bd213802c19204b827cb7134695.zip cpython-58de1dd6a8677bd213802c19204b827cb7134695.tar.gz cpython-58de1dd6a8677bd213802c19204b827cb7134695.tar.bz2 |
bpo-41525: Make the Python program help ASCII-only (GH-21836)
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r-- | Lib/test/test_cmd_line.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 4794d44..fa3329e 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -46,7 +46,11 @@ class CmdLineTest(unittest.TestCase): def test_usage(self): rc, out, err = assert_python_ok('-h') - self.assertIn(b'usage', out) + lines = out.splitlines() + self.assertIn(b'usage', lines[0]) + # The first line contains the program name, + # but the rest should be ASCII-only + b''.join(lines[1:]).decode('ascii') def test_version(self): version = ('Python %d.%d' % sys.version_info[:2]).encode("ascii") |