aboutsummaryrefslogtreecommitdiff
path: root/python/dep_spec_TEST.py
diff options
context:
space:
mode:
authorAvatar Marvin Schmidt <marv@exherbo.org> 2017-02-10 12:45:45 +0100
committerAvatar Marvin Schmidt <marv@exherbo.org> 2017-02-10 16:56:05 +0100
commitd15113c505809477fcde40b05f020acb53959e89 (patch)
tree932b0e4d92075d2160bc04135c41a06a3b5c9d8b /python/dep_spec_TEST.py
parent5b704a9d2b1886437f5031a3270e1e5d83f441b7 (diff)
downloadpaludis-d15113c505809477fcde40b05f020acb53959e89.tar.gz
paludis-d15113c505809477fcde40b05f020acb53959e89.tar.xz
python: Expose slot(s) accessors of some SlotRequirement classes
Based on the initial work of Michał Górny <mgorny@gentoo.org> Fixes: ticket:1348 Change-Id: Id8e3fa358766caabd219d1926cd8a057304da34d
Diffstat (limited to 'python/dep_spec_TEST.py')
-rwxr-xr-xpython/dep_spec_TEST.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/dep_spec_TEST.py b/python/dep_spec_TEST.py
index 28b26ca10..c00377e3b 100755
--- a/python/dep_spec_TEST.py
+++ b/python/dep_spec_TEST.py
@@ -31,6 +31,7 @@ class TestCase_1_DepSpecs(unittest.TestCase):
self.pds3 = parse_user_package_dep_spec("*/*::testrepo", self.env,
[UserPackageDepSpecOption.ALLOW_WILDCARDS])
self.pds4 = parse_user_package_dep_spec("cat/pkg::testrepo", self.env, [])
+ self.pds5 = parse_user_package_dep_spec(">=foo/bar-1:3/4::testrepo", self.env, [])
self.bds = BlockDepSpec("!>=foo/bar-1:100::testrepo", self.pds)
self.nds = NamedSetDepSpec("system")
@@ -65,6 +66,10 @@ class TestCase_1_DepSpecs(unittest.TestCase):
self.assertEqual(self.pds2.slot_requirement, None)
+ self.assert_(isinstance(self.pds5.slot_requirement, SlotExactFullRequirement))
+ self.assertEqual(str(self.pds5.slot_requirement.slots[0]), "3")
+ self.assertEqual(str(self.pds5.slot_requirement.slots[1]), "4")
+
def test_05_package(self):
self.get_depspecs()
self.assertEqual(str(self.pds.package), "foo/bar")