Skip to content

Commit

Permalink
test: Convert some more test cases to pytest+pexpect
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jul 8, 2018
1 parent dd9a6eb commit 73f05ba
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 50 deletions.
1 change: 0 additions & 1 deletion test/completion/rsync.exp

This file was deleted.

1 change: 0 additions & 1 deletion test/completion/sshfs.exp

This file was deleted.

28 changes: 0 additions & 28 deletions test/lib/completions/rsync.exp

This file was deleted.

20 changes: 0 additions & 20 deletions test/lib/completions/sshfs.exp

This file was deleted.

2 changes: 2 additions & 0 deletions test/t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ EXTRA_DIST = \
test_rpcdebug.py \
test_rpmbuild.py \
test_rrdtool.py \
test_rsync.py \
test_rtcwake.py \
test_runuser.py \
test_sbcl.py \
Expand Down Expand Up @@ -486,6 +487,7 @@ EXTRA_DIST = \
test_sqlite3.py \
test_ssh-add.py \
test_ssh-copy-id.py \
test_sshfs.py \
test_ssh-keygen.py \
test_sshmitm.py \
test_sshow.py \
Expand Down
19 changes: 19 additions & 0 deletions test/t/test_rsync.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import pytest


@pytest.mark.bashcomp(
ignore_env=r"^[+-]_scp_path_esc=",
)
class TestRsync(object):

@pytest.mark.complete("rsync ")
def test_1(self, completion):
assert completion.list

@pytest.mark.complete("rsync --rsh ")
def test_2(self, completion):
assert completion.list == "rsh ssh".split()

@pytest.mark.complete("rsync --rsh=")
def test_3(self, completion):
assert completion.list == "rsh ssh".split()
11 changes: 11 additions & 0 deletions test/t/test_sshfs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


@pytest.mark.bashcomp(
ignore_env=r"^[+-]_scp_path_esc=",
)
class TestSshfs(object):

@pytest.mark.complete("sshfs ./")
def test_1(self, completion):
assert completion.list

0 comments on commit 73f05ba

Please sign in to comment.