Skip to content

Commit 4ce55cc

Browse files
bpo-45195: Fix test_readline.test_nonascii() (GH-28329) (GH-28334)
Fix test_readline.test_nonascii(): sometimes, the newline character is not written at the end, so don't expect it in the output. (cherry picked from commit 797c8eb) Co-authored-by: Victor Stinner <[email protected]>
1 parent f71b86e commit 4ce55cc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Lib/test/test_readline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ def display(substitution, matches, longest_match_length):
236236
self.assertIn(b"matches ['t\\xebnt', 't\\xebxt']\r\n", output)
237237
expected = br"'[\xefnserted]|t\xebxt[after]'"
238238
self.assertIn(b"result " + expected + b"\r\n", output)
239-
self.assertIn(b"history " + expected + b"\r\n", output)
239+
# bpo-45195: Sometimes, the newline character is not written at the
240+
# end, so don't expect it in the output.
241+
self.assertIn(b"history " + expected, output)
240242

241243
# We have 2 reasons to skip this test:
242244
# - readline: history size was added in 6.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix test_readline.test_nonascii(): sometimes, the newline character is not
2+
written at the end, so don't expect it in the output. Patch by Victor
3+
Stinner.

0 commit comments

Comments
 (0)