diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2022-08-06 20:29:18 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2022-08-08 19:15:57 +0300 |
commit | e64326aafc2b71074c6a3382707f908cd0fe7425 (patch) | |
tree | c56c9a82dd9b4966b32a0592afe3c40b3bdc7514 /tests/ebuild | |
parent | ebuild/test_misc.py: modernize tests to pytest (diff) | |
download | pkgcore-e64326aafc2b71074c6a3382707f908cd0fe7425.tar.gz pkgcore-e64326aafc2b71074c6a3382707f908cd0fe7425.tar.bz2 pkgcore-e64326aafc2b71074c6a3382707f908cd0fe7425.zip |
ebuild/atom.py: atom.no_usedeps should include subslot
We don't have a lot of users of the property no_usedeps for atom, so it
was missed that we were ignoring the subslot value in the return. By
including it, we are fixing an issue that was found with
`VirtualKeywordsUpdate` in `virtual/podofo-build`.
Resolves: https://github.com/pkgcore/pkgcheck/issues/411
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests/ebuild')
-rw-r--r-- | tests/ebuild/test_atom.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ebuild/test_atom.py b/tests/ebuild/test_atom.py index 2f876a332..ab2e3091c 100644 --- a/tests/ebuild/test_atom.py +++ b/tests/ebuild/test_atom.py @@ -548,3 +548,23 @@ class Test_atom(test.TestRestriction): self.assertFalse(self.kls("=dev-util/diffball-1").is_simple) self.assertFalse(self.kls("dev-util/diffball[x]").is_simple) self.assertFalse(self.kls("dev-util/diffball[x?]").is_simple) + + def test_get_atom_without_use_deps(self): + for original, wanted in ( + ("<dev-util/diffball-2", "<dev-util/diffball-2"), + ("<dev-util/diffball-2[debug=,test=]", "<dev-util/diffball-2"), + ("=dev-util/diffball-2", "=dev-util/diffball-2"), + ("=dev-util/diffball-2[debug=,test=]", "=dev-util/diffball-2"), + ("=dev-util/diffball-2*", "=dev-util/diffball-2*"), + ("=dev-util/diffball-2*[debug=,test=]", "=dev-util/diffball-2*"), + ("dev-util/diffball:0", "dev-util/diffball:0"), + ("dev-util/diffball:0[debug=,test=]", "dev-util/diffball:0"), + ("dev-util/diffball:0/1.12", "dev-util/diffball:0/1.12"), + ("dev-util/diffball:0/1.12[debug=,test=]", "dev-util/diffball:0/1.12"), + ("!dev-util/diffball", "!dev-util/diffball"), + ("!dev-util/diffball[debug=,test=]", "!dev-util/diffball"), + ("!!dev-util/diffball", "!!dev-util/diffball"), + ("!!dev-util/diffball[debug=,test=]", "!!dev-util/diffball"), + ): + orig_atom = self.kls(original) + assert str(orig_atom.get_atom_without_use_deps) == wanted |