Author: kkaempf Date: Wed Sep 3 12:55:47 2008 New Revision: 10918 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10918&view=rev Log: 2nd example, search in filelist Modified: trunk/sat-solver/bindings/python/tests/search.py 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=10918&r1=10917&r2=10918&view=diff ============================================================================== --- trunk/sat-solver/bindings/python/tests/search.py (original) +++ trunk/sat-solver/bindings/python/tests/search.py Wed Sep 3 12:55:47 2008 @@ -17,9 +17,19 @@ pool.set_arch("i686") repo = pool.add_solv( "os11-biarch.solv" ) repo.set_name("test") - for d in repo.search("yast2", satsolver.SEARCH_SUBSTRING): + for d in repo.search("yast2", satsolver.SEARCH_STRING): print d.solvable(), "matches 'yast2' in ", d.key(), ": ", d.value() assert True + + def test_repo_search_files(self): + pool = satsolver.Pool() + assert pool + pool.set_arch("i686") + repo = pool.add_solv( "os11-biarch.solv" ) + repo.set_name("test") + for d in repo.search("/usr/bin/python", satsolver.SEARCH_STRING|satsolver.SEARCH_FILES): + print d.solvable(), "matches '/usr/bin/python' in ", d.key(), ": ", d.value() + assert True if __name__ == '__main__': unittest.main() -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org