diff options
author | Victor Stinner <vstinner@python.org> | 2021-09-14 17:38:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 17:38:04 +0200 |
commit | 797c8eb9ef511f0c25f10a453b35c4d2fe383c30 (patch) | |
tree | 671c71b3f1ea51d867d77385b7017cf11f0d51d1 /Lib/test/test_readline.py | |
parent | 7f60c9e1c6e22cc0e846a872c318570926cd3094 (diff) | |
download | cpython-797c8eb9ef511f0c25f10a453b35c4d2fe383c30.tar.gz cpython-797c8eb9ef511f0c25f10a453b35c4d2fe383c30.zip |
bpo-45195: Fix test_readline.test_nonascii() (GH-28329)
Fix test_readline.test_nonascii(): sometimes, the newline character
is not written at the end, so don't expect it in the output.
Diffstat (limited to 'Lib/test/test_readline.py')
-rw-r--r-- | Lib/test/test_readline.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py index e8fb8d2f9cc..59dbef90380 100644 --- a/Lib/test/test_readline.py +++ b/Lib/test/test_readline.py @@ -255,7 +255,9 @@ print("history", ascii(readline.get_history_item(1))) self.assertIn(b"matches ['t\\xebnt', 't\\xebxt']\r\n", output) expected = br"'[\xefnserted]|t\xebxt[after]'" self.assertIn(b"result " + expected + b"\r\n", output) - self.assertIn(b"history " + expected + b"\r\n", output) + # bpo-45195: Sometimes, the newline character is not written at the + # end, so don't expect it in the output. + self.assertIn(b"history " + expected, output) # We have 2 reasons to skip this test: # - readline: history size was added in 6.0 |