Author: kkaempf Date: Mon Oct 20 15:42:24 2008 New Revision: 11411 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11411&view=rev Log: - new testdata, matching latest file format - adapt search testcase for Pool search Modified: trunk/sat-solver/bindings/python/tests/os11-biarch.solv trunk/sat-solver/bindings/python/tests/search.py Modified: trunk/sat-solver/bindings/python/tests/os11-biarch.solv URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/python/tests/os11-biarch.solv?rev=11411&r1=11410&r2=11411&view=diff ============================================================================== Binary files - no diff available. Modified: trunk/sat-solver/bindings/python/tests/search.py URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/python/tests/search.py?rev=11411&r1=11410&r2=11411&view=diff ============================================================================== --- trunk/sat-solver/bindings/python/tests/search.py (original) +++ trunk/sat-solver/bindings/python/tests/search.py Mon Oct 20 15:42:24 2008 @@ -10,7 +10,40 @@ import satsolver class TestSearchFunctions(unittest.TestCase): + # + # Pool search + # + def test_pool_search(self): + pool = satsolver.Pool() + assert pool + pool.set_arch("i686") + repo = pool.add_solv( "os11-biarch.solv" ) + repo.set_name("test") + i = 0 + for d in pool.search("yast2", satsolver.SEARCH_STRING): + print d.solvable(), "matches 'yast2' in ", d.keyname(), ": ", d.value() + i = i + 1 + if i > 10: + break; + assert True + + def test_pool_search_files(self): + pool = satsolver.Pool() + assert pool + pool.set_arch("i686") + repo = pool.add_solv( "os11-biarch.solv" ) + repo.set_name("test") + i = 0 + for d in pool.search("/usr/bin/python", satsolver.SEARCH_STRING|satsolver.SEARCH_FILES, None, "solvable:filelist"): + print d.solvable(), "matches '/usr/bin/python' in ", d.keyname(), ": ", d.value() + i = i + 1 + if i > 10: + break; + assert True + # + # Repo search + # def test_repo_search(self): pool = satsolver.Pool() assert pool -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org