summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-03-02 19:56:37 -0500
committerGitHub <noreply@github.com>2018-03-02 19:56:37 -0500
commit40b52252a3108c8989afd6ca7e64ce9d4116cb4f (patch)
tree5672d2c25ee1fadaee332ee208e3f0770caebcb0 /tests/test_cmd2.py
parent388d48682823a192d349ad877b1fd1ae5d92df44 (diff)
parentbca845494dcc91cab87c2d7af4b5513a4893715b (diff)
downloadcmd2-git-40b52252a3108c8989afd6ca7e64ce9d4116cb4f.tar.gz
Merge pull request #294 from python-cmd2/pytest_forked
Use pytest-forked module for Linux CI
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r--tests/test_cmd2.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 5facd0ac..6de86b2d 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -11,7 +11,6 @@ import io
import tempfile
import mock
-import pexpect
import pytest
import six
@@ -1502,37 +1501,3 @@ def test_poutput_none(base_app):
out = base_app.stdout.buffer
expected = ''
assert out == expected
-
-
-@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')
-
- python = 'python3'
- if six.PY2:
- python = 'python2'
-
- command = '{} {}'.format(python, persistent_app)
-
- # Start an instance of the persistent history example and send it a few commands
- child = pexpect.spawn(command)
- prompt = 'ph> '
- child.expect(prompt)
- child.sendline('help')
- child.expect(prompt)
- child.sendline('help history')
- child.expect(prompt)
- child.sendline('quit')
- child.close()
-
- # Start a 2nd instance of the persistent history example and send it an up arrow to verify persistent history
- up_arrow = '\x1b[A'
- child2 = pexpect.spawn(command)
- child2.expect(prompt)
- child2.send(up_arrow)
- child2.expect('quit')
- assert child2.after == b'quit'
- child2.close()