mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-44949: Fix test_readline auto history tests (#27813)
This commit is contained in:
parent
8cf07d3db3
commit
6fb62b42f4
2 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue