Skip to content

Commit f3c6b1b

Browse files
committed
Flag the pexpect unit test of the persistent history to only run on macOS
- The Windows pexpect API is different from macOS or Linux - On Travis CI, the test behaves as if readline isn't working on those machines - The test runs fine when run on my system (on either macOS or Linux)
1 parent e4f14fb commit f3c6b1b

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ language: python
22

33
sudo: false # false enables container-based build for fast boot times on Linux
44

5-
addons:
6-
apt:
7-
packages:
8-
- libreadline6
9-
105
matrix:
116
include:
127
- os: linux

tests/test_cmd2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,9 +1528,10 @@ def test_poutput_none(base_app):
15281528
assert out == expected
15291529

15301530

1531-
@pytest.mark.skipif(sys.platform == 'win32',
1532-
reason="pexpect doesn't have a spawn() function on Windows")
1531+
@pytest.mark.skipif(sys.platform == 'win32' or sys.platform.startswith('lin'),
1532+
reason="pexpect doesn't have a spawn() function on Windows and readline doesn't work on TravisCI")
15331533
def test_persistent_history(request):
1534+
"""Will run on macOS to verify expected persistent history behavior."""
15341535
test_dir = os.path.dirname(request.module.__file__)
15351536
persistent_app = os.path.join(test_dir, '..', 'examples', 'persistent_history.py')
15361537

0 commit comments

Comments
 (0)