aboutsummaryrefslogtreecommitdiff
path: root/python/dep_spec_TEST.py
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <p.jaroszynski@gmail.com> 2008-06-16 13:10:50 +0200
committerAvatar Piotr Jaroszyński <p.jaroszynski@gmail.com> 2008-06-16 15:10:06 +0200
commitfa86b0a09fedb9b65df6da0fe08323676a1a0b56 (patch)
tree08c3c6c139d6afce093b962a991b265bd6a3883f /python/dep_spec_TEST.py
parent4bf02ec7bba7b3d01de7b0acdc56e9ebef35a2dd (diff)
downloadpaludis-fa86b0a09fedb9b65df6da0fe08323676a1a0b56.tar.gz
paludis-fa86b0a09fedb9b65df6da0fe08323676a1a0b56.tar.xz
(python) Update bindings for parse_user_package_dep_spec changes.
Diffstat (limited to 'python/dep_spec_TEST.py')
-rwxr-xr-xpython/dep_spec_TEST.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/python/dep_spec_TEST.py b/python/dep_spec_TEST.py
index 2326fa3c8..b67546411 100755
--- a/python/dep_spec_TEST.py
+++ b/python/dep_spec_TEST.py
@@ -23,12 +23,14 @@ import unittest
class TestCase_1_DepSpecs(unittest.TestCase):
def get_depspecs(self):
+ self.env = TestEnvironment()
self.ptds = PlainTextDepSpec("foo")
- self.pds = parse_user_package_dep_spec(">=foo/bar-1:100::testrepo", [])
- self.pds2 = parse_user_package_dep_spec("*/*::testrepo",
+ self.pds = parse_user_package_dep_spec(">=foo/bar-1:100::testrepo", self.env, [])
+ self.pds2 = parse_user_package_dep_spec("*/*::testrepo", self.env,
UserPackageDepSpecOptions() + UserPackageDepSpecOption.ALLOW_WILDCARDS)
- self.pds3 = parse_user_package_dep_spec("*/*::testrepo", [UserPackageDepSpecOption.ALLOW_WILDCARDS])
- self.pds4 = parse_user_package_dep_spec("cat/pkg::testrepo", [])
+ 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.bds = BlockDepSpec(self.pds)
self.nds = NamedSetDepSpec("system")
@@ -36,17 +38,18 @@ class TestCase_1_DepSpecs(unittest.TestCase):
self.get_depspecs()
def test_02_create_error(self):
+ self.get_depspecs()
self.assertRaises(Exception, DepSpec)
self.assertRaises(Exception, PackageDepSpec)
self.assertRaises(Exception, StringDepSpec)
self.assertRaises(BadVersionOperatorError, parse_user_package_dep_spec,
- "<>foo/bar", UserPackageDepSpecOptions())
+ "<>foo/bar", self.env, UserPackageDepSpecOptions())
self.assertRaises(PackageDepSpecError, parse_user_package_dep_spec,
- "=foo/bar", [])
+ "=foo/bar", self.env, [])
self.assertRaises(PackageDepSpecError, parse_user_package_dep_spec,
- "*/*::testrepo", UserPackageDepSpecOptions())
+ "*/*::testrepo", self.env, UserPackageDepSpecOptions())
self.assertRaises(PackageDepSpecError, parse_user_package_dep_spec,
- "*/*::testrepo", [])
+ "*/*::testrepo", self.env, [])
def test_03_str(self):
self.get_depspecs()
@@ -85,7 +88,7 @@ class TestCase_1_DepSpecs(unittest.TestCase):
### self.assert_(isinstance(ur, EnabledUseRequirement))
def test_10_without_additional_requirements(self):
- spec = parse_user_package_dep_spec("foo/monkey[foo]", UserPackageDepSpecOptions())
+ spec = parse_user_package_dep_spec("foo/monkey[foo]", TestEnvironment(), UserPackageDepSpecOptions())
pds = spec.without_additional_requirements()
### self.assertEquals(pds.additional_requirements, None)
### self.assertEquals(str(pds), "foo/monkey")