Skip to content

Commit 7420eda

Browse files
committed
Improved a few tests to be slightly stricter, but permissive enough they work on Windows with Python 3.14
1 parent b597343 commit 7420eda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_history.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def test_history_verbose_with_other_options(base_app):
772772
options_to_test = ['-r', '-e', '-o file', '-t file', '-c', '-x']
773773
for opt in options_to_test:
774774
out, err = run_cmd(base_app, 'history -v ' + opt)
775-
assert len(out) >= 4
775+
assert 4 <= len(out) <= 5
776776
assert out[0] == '-v cannot be used with any other options'
777777
assert out[1].startswith('Usage:')
778778
assert base_app.last_result is False
@@ -800,7 +800,7 @@ def test_history_script_with_invalid_options(base_app):
800800
options_to_test = ['-r', '-e', '-o file', '-t file', '-c']
801801
for opt in options_to_test:
802802
out, err = run_cmd(base_app, 'history -s ' + opt)
803-
assert len(out) >= 4
803+
assert 4 <= len(out) <= 5
804804
assert out[0] == '-s and -x cannot be used with -c, -r, -e, -o, or -t'
805805
assert out[1].startswith('Usage:')
806806
assert base_app.last_result is False
@@ -820,7 +820,7 @@ def test_history_expanded_with_invalid_options(base_app):
820820
options_to_test = ['-r', '-e', '-o file', '-t file', '-c']
821821
for opt in options_to_test:
822822
out, err = run_cmd(base_app, 'history -x ' + opt)
823-
assert len(out) >= 4
823+
assert 4 <= len(out) <= 5
824824
assert out[0] == '-s and -x cannot be used with -c, -r, -e, -o, or -t'
825825
assert out[1].startswith('Usage:')
826826
assert base_app.last_result is False

0 commit comments

Comments
 (0)