diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/test_pkgdev_showkw.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/scripts/test_pkgdev_showkw.py b/tests/scripts/test_pkgdev_showkw.py new file mode 100644 index 0000000..635cb69 --- /dev/null +++ b/tests/scripts/test_pkgdev_showkw.py @@ -0,0 +1,19 @@ +import pytest + + +class TestPkgdevShowkwParseArgs: + + def test_missing_target(self, capsys, tool): + with pytest.raises(SystemExit): + tool.parse_args(['showkw']) + captured = capsys.readouterr() + assert captured.err.strip() == ( + 'pkgdev showkw: error: missing target argument and not in a supported repo') + + def test_unknown_arches(self, capsys, tool, make_repo): + repo = make_repo(arches=['amd64']) + with pytest.raises(SystemExit): + tool.parse_args(['showkw', '-a', 'unknown', '-r', repo.location]) + captured = capsys.readouterr() + assert captured.err.strip() == ( + "pkgdev showkw: error: unknown arch: 'unknown' (choices: amd64)") |