aboutsummaryrefslogtreecommitdiff
path: root/python/dep_spec_TEST.py
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 14:20:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 20:52:24 +0100
commite52571861104efe6139b78b22557211f08025f11 (patch)
tree634bec98491886d12f8f5a25b24f4cacf8d69de5 /python/dep_spec_TEST.py
parent80bf4ad14bfd8ab74a9c0d5f203ad5a370351def (diff)
downloadpaludis-e52571861104efe6139b78b22557211f08025f11.tar.gz
paludis-e52571861104efe6139b78b22557211f08025f11.tar.xz
Revert the package dep spec changes
Diffstat (limited to 'python/dep_spec_TEST.py')
-rwxr-xr-xpython/dep_spec_TEST.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/python/dep_spec_TEST.py b/python/dep_spec_TEST.py
index da992cfe5..ec22662c4 100755
--- a/python/dep_spec_TEST.py
+++ b/python/dep_spec_TEST.py
@@ -64,12 +64,24 @@ class TestCase_1_DepSpecs(unittest.TestCase):
def test_05_package(self):
self.get_depspecs()
- self.assertEqual(str(self.pds.package_name_requirement.name), "foo/bar")
+ self.assertEqual(str(self.pds.package), "foo/bar")
def test_06_in_from_repository(self):
self.get_depspecs()
- self.assertEqual(str(self.pds.in_repository_requirement.name), "testrepo")
- self.assertEqual(self.pds.from_repository_requirement, None)
+ self.assertEqual(str(self.pds.in_repository), "testrepo")
+ self.assertEqual(self.pds.from_repository, None)
+
+ def test_07_version_requirements(self):
+ self.get_depspecs()
+ vrc = self.pds.version_requirements
+
+ self.assertEquals(len(list(vrc)), 1)
+ self.assertEquals(iter(vrc).next().version_spec, VersionSpec("1"))
+ self.assertEquals(iter(vrc).next().version_operator.value, VersionOperator(">=").value)
+
+ def test_08_version_requirements_mode(self):
+ self.get_depspecs()
+ self.assertEquals(self.pds.version_requirements_mode, VersionRequirementsMode.AND)
### def test_09_additional_requirements(self):
### spec = parse_user_package_dep_spec("foo/monkey[foo]", UserPackageDepSpecOptions())