diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-09-09 00:46:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 00:46:41 (GMT) |
commit | 9171dc2827650a1a3c20dee994145e335befa00e (patch) | |
tree | 79c7242a46da380d3d617452196d2fc4d38b3596 /Lib/test | |
parent | 68bc6792b4725939499b8b4eb7fa8bb6ccc190a2 (diff) | |
download | cpython-9171dc2827650a1a3c20dee994145e335befa00e.zip cpython-9171dc2827650a1a3c20dee994145e335befa00e.tar.gz cpython-9171dc2827650a1a3c20dee994145e335befa00e.tar.bz2 |
bpo-41525: Make the Python program help ASCII-only (GH-21836)
(cherry picked from commit 58de1dd6a8677bd213802c19204b827cb7134695)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test')
-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 5fc5bff..a5ece9b 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -44,7 +44,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") |