diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-08-19 08:52:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 08:52:16 (GMT) |
commit | fc6ad0585e8133ee0fca05f0f8075b62fe71a95d (patch) | |
tree | 7031adfeb4caa2b505730f7944af5ee14c1824d4 /Lib/test | |
parent | ad16f93942a398ca1ec9bba54bb9c53a4e121e75 (diff) | |
download | cpython-fc6ad0585e8133ee0fca05f0f8075b62fe71a95d.zip cpython-fc6ad0585e8133ee0fca05f0f8075b62fe71a95d.tar.gz cpython-fc6ad0585e8133ee0fca05f0f8075b62fe71a95d.tar.bz2 |
bpo-44949: Fix test_readline auto history tests (GH-27813)
(cherry picked from commit 6fb62b42f4db56ed5efe0ca4c1059049276c1083)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_readline.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py index f3e404d..e8fb8d2 100644 --- a/Lib/test/test_readline.py +++ b/Lib/test/test_readline.py @@ -156,11 +156,15 @@ print("History length:", readline.get_current_history_length()) def test_auto_history_enabled(self): output = run_pty(self.auto_history_script.format(True)) - self.assertIn(b"History length: 1\r\n", output) + # bpo-44949: Sometimes, the newline character is not written at the + # end, so don't expect it in the output. + self.assertIn(b"History length: 1", output) def test_auto_history_disabled(self): output = run_pty(self.auto_history_script.format(False)) - self.assertIn(b"History length: 0\r\n", output) + # bpo-44949: Sometimes, the newline character is not written at the + # end, so don't expect it in the output. + self.assertIn(b"History length: 0", output) def test_nonascii(self): loc = locale.setlocale(locale.LC_CTYPE, None) |