Skip to content

Commit 797c8eb

Browse files
authored
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.
1 parent 7f60c9e commit 797c8eb

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
@@ -255,7 +255,9 @@ def display(substitution, matches, longest_match_length):
255255
self.assertIn(b"matches ['t\\xebnt', 't\\xebxt']\r\n", output)
256256
expected = br"'[\xefnserted]|t\xebxt[after]'"
257257
self.assertIn(b"result " + expected + b"\r\n", output)
258-
self.assertIn(b"history " + expected + b"\r\n", output)
258+
# bpo-45195: Sometimes, the newline character is not written at the
259+
# end, so don't expect it in the output.
260+
self.assertIn(b"history " + expected, output)
259261

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