Mailinglist Archive: zypp-devel (102 mails)
| < Previous | Next > |
Re: [zypp-devel] [PATCH 3/3] Fix Python testcase for the Solver
- From: Klaus Kaempf <kkaempf@xxxxxxx>
- Date: Tue, 17 Mar 2009 15:07:58 +0100
- Message-id: <20090317140758.GA30601@xxxxxxxxxxxxx>
* Jan Blunck <jblunck@xxxxxxx> [Mar 17. 2009 14:46]:
Thanks for your patch. I will take your additional testcase (assertion
that only one product is in the pool) but keep the deleted (test 'get'
and test 'pool iterator') ones.
Klaus
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
Ask the Solver for a specific provider instead of the Solvable id in the
pool.
Thanks for your patch. I will take your additional testcase (assertion
that only one product is in the pool) but keep the deleted (test 'get'
and test 'pool iterator') ones.
Klaus
---
Signed-off-by: Jan Blunck <jblunck@xxxxxxx>
---
bindings/python/tests/solvable.py | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/bindings/python/tests/solvable.py
b/bindings/python/tests/solvable.py
index 720bfd2..141368f 100644
--- a/bindings/python/tests/solvable.py
+++ b/bindings/python/tests/solvable.py
@@ -34,22 +34,10 @@ class TestSequenceFunctions(unittest.TestCase):
self.pool.set_arch("i686")
self.pool.add_solv( "os11-biarch.solv" )
assert self.pool.size() > 0
-
- def test_solvable(self):
- solv = self.pool.get(2)
- assert solv
- print solv
- print "%s-%s.%s[%s]" % (solv.name(),solv.evr(),solv.arch(),solv.vendor())
-
- def test_deps(self):
- return
- for s in pool:
- print s
- show_dep( "Provides", s.provides())
- show_dep( "Requires", s.requires())
- show_dep( "Obsoletes", s.obsoletes())
- show_dep( "Conflicts", s.conflicts())
+ def test_solvable(self):
+ solv = list(self.pool.providers( 'product:openSUSE' ))
+ assert len(solv) == 1, len(solv)
def test_creation(self):
repo = self.pool.create_repo( 'test' )
@@ -67,7 +55,7 @@ class TestSequenceFunctions(unittest.TestCase):
assert solv2.evr() == "2.0-0"
solv2.set_vendor("Ruby")
assert solv2.vendor() == "Ruby"
-
+
rel = satsolver.Relation( self.pool, "two", satsolver.REL_GE, "2.0-0" )
assert rel
solv1.requires().add(rel)
--
1.6.1.3
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |