diff options
author | Tim Harder <radhermit@gmail.com> | 2021-03-31 12:17:59 -0600 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2021-03-31 12:39:18 -0600 |
commit | 1f7316f6e5b851f8b1f7fed49e444046614b94e4 (patch) | |
tree | d487836ee3db2cf881d72a2135e36de723280f87 /tests | |
parent | tests: update git repo default branch name (diff) | |
download | pkgdev-1f7316f6e5b851f8b1f7fed49e444046614b94e4.tar.gz pkgdev-1f7316f6e5b851f8b1f7fed49e444046614b94e4.tar.bz2 pkgdev-1f7316f6e5b851f8b1f7fed49e444046614b94e4.zip |
pkgdev showkw: initial import, moved from pkgcore's pshowkw
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)") |