diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-02-09 01:17:33 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-02-09 01:17:33 -0500 |
commit | f3c6b1b32d614076dc17d2736ae1860d37a36cd5 (patch) | |
tree | d5177fbf8ea7a732ae21febbf7e1c006e059ce2e /tests/test_cmd2.py | |
parent | e4f14fb76050b7d063463080343cc3ca17cd0e49 (diff) | |
download | cmd2-git-f3c6b1b32d614076dc17d2736ae1860d37a36cd5.tar.gz |
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)
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 9f8a4044..ee9c1fc3 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1528,9 +1528,10 @@ def test_poutput_none(base_app): assert out == expected -@pytest.mark.skipif(sys.platform == 'win32', - reason="pexpect doesn't have a spawn() function on Windows") +@pytest.mark.skipif(sys.platform == 'win32' or sys.platform.startswith('lin'), + reason="pexpect doesn't have a spawn() function on Windows and readline doesn't work on TravisCI") def test_persistent_history(request): + """Will run on macOS to verify expected persistent history behavior.""" test_dir = os.path.dirname(request.module.__file__) persistent_app = os.path.join(test_dir, '..', 'examples', 'persistent_history.py') |