summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-12-08 20:31:15 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-12-08 20:31:15 +0100
commita84352261cd34aaa34b3c4507d9d8e6216170050 (patch)
tree430d446d39f835edc8717069cfab09f6bed7172b
parent33c83f032fa17f0068a3a1b5486a3cfcfeabd66d (diff)
downloadpython-apt-a84352261cd34aaa34b3c4507d9d8e6216170050.tar.gz
* tests/test_apt_cache.py:
- add additional check if provides test can actually be run
-rw-r--r--debian/changelog2
-rw-r--r--tests/test_apt_cache.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 2b16a2bd..46a94688 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ python-apt (0.8.3) UNRELEASED; urgency=low
[ Michael Vogt ]
* lp:~mvo/python-apt/debfile-multiarch:
- add multiarch support to the debfile.py code
+ * tests/test_apt_cache.py:
+ - add additional check if provides test can actually be run
-- Michael Vogt <michael.vogt@ubuntu.com> Thu, 08 Dec 2011 17:26:37 +0100
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py
index e62507ed..2bc19353 100644
--- a/tests/test_apt_cache.py
+++ b/tests/test_apt_cache.py
@@ -74,6 +74,9 @@ class TestAptCache(unittest.TestCase):
apt.apt_pkg.config.set("Apt::architecture", "i386")
cache = apt.Cache(rootdir="./data/test-provides/")
cache.open()
+ if len(cache) == 0:
+ logging.warn("skipping test_get_provided_packages, cache empty?!?")
+ return
# a true virtual pkg
l = cache.get_providing_packages("mail-transport-agent")
self.assertTrue(len(l) > 0)
@@ -84,6 +87,9 @@ class TestAptCache(unittest.TestCase):
apt.apt_pkg.config.set("Apt::architecture", "i386")
# create highlevel cache and get the lowlevel one from it
highlevel_cache = apt.Cache(rootdir="./data/test-provides")
+ if len(highlevel_cache) == 0:
+ logging.warn("skipping test_log_level_pkg_provides, cache empty?!?")
+ return
# low level cache provides list of the pkg
cache = highlevel_cache._cache
l = cache["mail-transport-agent"].provides_list