Skip to content

Commit aa6a4d6

Browse files
nirsberkerpeksag
authored andcommitted
bpo-29854: Skip history-size test on older readline (GH-2621)
Turns out that history-size was added in readline 6.0. This explain why this tests fail on FreeBSD when using readline 5.2. We skip now the history size if readline does not support it. See https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES for details.
1 parent 223c7e7 commit aa6a4d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_readline.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ def display(substitution, matches, longest_match_length):
226226
self.assertIn(b"result " + expected + b"\r\n", output)
227227
self.assertIn(b"history " + expected + b"\r\n", output)
228228

229+
# We have 2 reasons to skip this test:
230+
# - readline: history size was added in 6.0
231+
# See https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES
232+
# - editline: history size is broken on OS X 10.11.6.
233+
# Newer versions were not tested yet.
234+
@unittest.skipIf(readline._READLINE_VERSION < 0x600,
235+
"this readline version does not support history-size")
229236
@unittest.skipIf(is_editline,
230237
"editline history size configuration is broken")
231238
def test_history_size(self):

0 commit comments

Comments
 (0)