aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-06-02 22:18:05 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-06-02 22:18:05 +0300
commitd37395418f44d5716a24d9cc84f8bf2d8bc084bb (patch)
tree7f1f80972060da29bcffdde7451d6f91a4438d5d /tests
parentmask: support comma separated bugs (diff)
downloadpkgdev-d37395418f44d5716a24d9cc84f8bf2d8bc084bb.tar.gz
pkgdev-d37395418f44d5716a24d9cc84f8bf2d8bc084bb.tar.bz2
pkgdev-d37395418f44d5716a24d9cc84f8bf2d8bc084bb.zip
mask: fix test & improve error messages
Resolves: https://github.com/pkgcore/pkgdev/issues/188 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pkgdev_mask.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/scripts/test_pkgdev_mask.py b/tests/scripts/test_pkgdev_mask.py
index 8366ced..63d1e53 100644
--- a/tests/scripts/test_pkgdev_mask.py
+++ b/tests/scripts/test_pkgdev_mask.py
@@ -337,6 +337,7 @@ class TestPkgdevMask:
for bug_nums, expected in [
(["42"], "Bug #42."),
(["42", "43"], "Bugs #42, #43."),
+ (["42,43", "43"], "Bugs #42, #43."),
]:
args = []
for bug_num in bug_nums:
@@ -361,7 +362,7 @@ class TestPkgdevMask:
def test_mask_bug_bad(self, capsys, tool):
for arg, expected in [("-1", "must be >= 1"), ("foo", "invalid integer value")]:
- with pytest.raises(SystemExit):
+ with pytest.raises(SystemExit), chdir(pjoin(self.repo.path)):
tool.parse_args(["mask", "--bug", arg])
out, err = capsys.readouterr()
assert err.strip() == f"pkgdev mask: error: argument -b/--bug: {expected}"