Skip to content

Commit

Permalink
test: Convert some more trivial test cases to pytest+pexpect
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jul 4, 2018
1 parent de97e77 commit 8c9c4f1
Show file tree
Hide file tree
Showing 28 changed files with 93 additions and 189 deletions.
1 change: 0 additions & 1 deletion test/completion/arping.exp

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

1 change: 0 additions & 1 deletion test/completion/munin-node-configure.exp

This file was deleted.

21 changes: 0 additions & 21 deletions test/lib/completions/arping.exp

This file was deleted.

21 changes: 0 additions & 21 deletions test/lib/completions/bind.exp

This file was deleted.

22 changes: 0 additions & 22 deletions test/lib/completions/convert.exp

This file was deleted.

18 changes: 0 additions & 18 deletions test/lib/completions/function.exp

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

18 changes: 0 additions & 18 deletions test/lib/completions/munin-node-configure.exp

This file was deleted.

9 changes: 9 additions & 0 deletions test/t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ EXTRA_DIST = \
test_apt-build.py \
test_apt-cache.py \
test_aptitude.py \
test_arping.py \
test_arpspoof.py \
test_asciidoc.py \
test_aspell.py \
Expand All @@ -31,6 +32,7 @@ EXTRA_DIST = \
test_base64.py \
test_bash.py \
test_bc.py \
test_bind.py \
test_bison.py \
test_bk.py \
test_brctl.py \
Expand Down Expand Up @@ -65,6 +67,7 @@ EXTRA_DIST = \
test_composite.py \
test_config_list.py \
test_conjure.py \
test_convert.py \
test_co.py \
test_cowsay.py \
test_cpan2dist.py \
Expand Down Expand Up @@ -111,12 +114,14 @@ EXTRA_DIST = \
test_freebsd-update.py \
test_freeciv-gtk2.py \
test_freeciv-server.py \
test_function.py \
test_fusermount.py \
test_g4.py \
test_g77.py \
test_gcc.py \
test_gcj.py \
test_gcl.py \
test_gdb.py \
test_gendiff.py \
test_genisoimage.py \
test_geoiplookup.py \
Expand Down Expand Up @@ -163,6 +168,7 @@ EXTRA_DIST = \
test_ipsec.py \
test_iptables.py \
test_irb.py \
test_iscsiadm.py \
test_iwconfig.py \
test_iwlist.py \
test_iwpriv.py \
Expand All @@ -177,6 +183,7 @@ EXTRA_DIST = \
test_kldload.py \
test_kplayer.py \
test_l2ping.py \
test_larch.py \
test_lastlog.py \
test_ldapadd.py \
test_ldapcompare.py \
Expand Down Expand Up @@ -205,6 +212,7 @@ EXTRA_DIST = \
test_luseradd.py \
test_luserdel.py \
test_lusermod.py \
test_lvm.py \
test_lzip.py \
test_macof.py \
test_mailsnarf.py \
Expand All @@ -230,6 +238,7 @@ EXTRA_DIST = \
test_msgsnarf.py \
test_msynctool.py \
test_mtx.py \
test_munin-node-configure.py \
test_munin-run.py \
test_mussh.py \
test_muttng.py \
Expand Down
12 changes: 12 additions & 0 deletions test/t/test_arping.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pytest


class Test(object):

@pytest.mark.complete("arping ")
def test_(self, completion):
assert completion.list

@pytest.mark.complete("arping -")
def test_dash(self, completion):
assert completion.list
12 changes: 12 additions & 0 deletions test/t/test_bind.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pytest


class Test(object):

@pytest.mark.complete("bind -")
def test_dash(self, completion):
assert completion.list

@pytest.mark.complete("bind k")
def test_k(self, completion):
assert completion.list
12 changes: 12 additions & 0 deletions test/t/test_convert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pytest


class Test(object):

@pytest.mark.complete("convert ")
def test_(self, completion):
assert completion.list

@pytest.mark.complete("convert -format ")
def test_format(self, completion):
assert completion.list
8 changes: 8 additions & 0 deletions test/t/test_function.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


class Test(object):

@pytest.mark.complete("function _parse_")
def test_parse(self, completion):
assert completion.list
8 changes: 8 additions & 0 deletions test/t/test_gdb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


class Test(object):

@pytest.mark.complete("gdb - ")
def test_dash(self, completion):
assert completion.list
8 changes: 8 additions & 0 deletions test/t/test_iscsiadm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


class Test(object):

@pytest.mark.complete("iscsiadm --mode")
def test_mode(self, completion):
assert completion.list
8 changes: 8 additions & 0 deletions test/t/test_larch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


class Test(object):

@pytest.mark.complete("larch library-")
def test_library(self, completion):
assert completion.list
8 changes: 8 additions & 0 deletions test/t/test_lvm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


class Test(object):

@pytest.mark.complete("lvm pv")
def test_pv(self, completion):
assert completion.list
8 changes: 8 additions & 0 deletions test/t/test_munin-node-configure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


class Test(object):

@pytest.mark.complete("munin-node-configure --libdir")
def test_libdir(self, completion):
assert completion.list

0 comments on commit 8c9c4f1

Please sign in to comment.