aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2021-03-24 14:16:10 -0600
committerTim Harder <radhermit@gmail.com>2021-03-24 14:16:10 -0600
commitb959c4ee0e56e1a02f2f2d39881d116a305a4aa4 (patch)
tree082ef39ef70ba608b570d3272ef200e9f4c16f91 /tests
parentpkgdev mask: allow specific version masking using ebuild args (diff)
downloadpkgdev-b959c4ee0e56e1a02f2f2d39881d116a305a4aa4.tar.gz
pkgdev-b959c4ee0e56e1a02f2f2d39881d116a305a4aa4.tar.bz2
pkgdev-b959c4ee0e56e1a02f2f2d39881d116a305a4aa4.zip
tests: add check for masking a specific ebuild version via its path
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pkgdev_mask.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/scripts/test_pkgdev_mask.py b/tests/scripts/test_pkgdev_mask.py
index bbb85e7..3e0b7bb 100644
--- a/tests/scripts/test_pkgdev_mask.py
+++ b/tests/scripts/test_pkgdev_mask.py
@@ -157,6 +157,14 @@ class TestPkgdevMask:
self.script()
assert self.profile.masks == frozenset([atom_cls('cat/pkg')])
+ def test_mask_ebuild_path(self):
+ with os_environ(EDITOR="sed -i '1s/$/mask comment/'"), \
+ patch('sys.argv', self.args + ['cat/pkg/pkg-0.ebuild']), \
+ pytest.raises(SystemExit), \
+ chdir(pjoin(self.repo.path)):
+ self.script()
+ assert self.profile.masks == frozenset([atom_cls('=cat/pkg-0')])
+
def test_existing_masks(self):
self.masks_path.write_text(textwrap.dedent("""\
# Random Dev <random.dev@email.com> (2021-03-24)