diff options
author | Klaus Kämpf <kkaempf@suse.de> | 2010-12-06 14:41:23 +0100 |
---|---|---|
committer | Klaus Kämpf <kkaempf@suse.de> | 2010-12-06 14:41:23 +0100 |
commit | a35529dc50aa907f9f1c3a4f05158bc7f4debbc0 (patch) | |
tree | 2b479391ec303eeb100b8fb2da499280f1b2f8a8 /swig/python | |
parent | 75f229e2e5fe0eb858aa71819150f27c16f95627 (diff) | |
download | libzypp-bindings-a35529dc50aa907f9f1c3a4f05158bc7f4debbc0.tar.gz libzypp-bindings-a35529dc50aa907f9f1c3a4f05158bc7f4debbc0.tar.bz2 libzypp-bindings-a35529dc50aa907f9f1c3a4f05158bc7f4debbc0.zip |
Fix Problems iterator in Python
Diffstat (limited to 'swig/python')
-rw-r--r-- | swig/python/tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | swig/python/tests/problems.py | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/swig/python/tests/CMakeLists.txt b/swig/python/tests/CMakeLists.txt index 8424cc0..e35d3ac 100644 --- a/swig/python/tests/CMakeLists.txt +++ b/swig/python/tests/CMakeLists.txt @@ -6,4 +6,5 @@ ENABLE_TESTING() ADD_TEST(bindings_python_loading python ${CMAKE_CURRENT_SOURCE_DIR}/loading.py) ADD_TEST(bindings_python_repoinfo python ${CMAKE_CURRENT_SOURCE_DIR}/repoinfo.py) -ADD_TEST(bindings_python_commit_callbacks python ${CMAKE_CURRENT_SOURCE_DIR}/commit_callbacks.py)
\ No newline at end of file +ADD_TEST(bindings_python_commit_callbacks python ${CMAKE_CURRENT_SOURCE_DIR}/commit_callbacks.py) +ADD_TEST(bindings_python_problems python ${CMAKE_CURRENT_SOURCE_DIR}/problems.py) diff --git a/swig/python/tests/problems.py b/swig/python/tests/problems.py new file mode 100644 index 0000000..0406290 --- /dev/null +++ b/swig/python/tests/problems.py @@ -0,0 +1,21 @@ +import unittest + +import os +cwd = os.path.abspath(os.path.dirname(__file__)) + +import sys +sys.path.insert(0, cwd + "/../../../build/swig/python") + +class TestSequenceFunctions(unittest.TestCase): + + def testproblems(self): + import zypp + Z = zypp.ZYppFactory.instance().getZYpp() + assert Z + if not Z.resolver().resolvePool(): + for problem in Z.resolver().problems(): + print "Problem %s" % problem.description() +# raise "Solver Error" + +if __name__ == '__main__': + unittest.main() |