* Jan Blunck
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
--- 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@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
--- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org