Skip to content

Commit 1d8cb01

Browse files
bpo-45195: Fix test_readline.test_nonascii() (GH-28329) (GH-28984)
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 90004fc commit 1d8cb01

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
@@ -232,7 +232,9 @@ def display(substitution, matches, longest_match_length):
232232
self.assertIn(b"matches ['t\\xebnt', 't\\xebxt']\r\n", output)
233233
expected = br"'[\xefnserted]|t\xebxt[after]'"
234234
self.assertIn(b"result " + expected + b"\r\n", output)
235-
self.assertIn(b"history " + expected + b"\r\n", output)
235+
# bpo-45195: Sometimes, the newline character is not written at the
236+
# end, so don't expect it in the output.
237+
self.assertIn(b"history " + expected, output)
236238

237239
# We have 2 reasons to skip this test:
238240
# - 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)