diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-12-08 20:31:15 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-12-08 20:31:15 +0100 |
| commit | a84352261cd34aaa34b3c4507d9d8e6216170050 (patch) | |
| tree | 430d446d39f835edc8717069cfab09f6bed7172b /tests/test_apt_cache.py | |
| parent | 33c83f032fa17f0068a3a1b5486a3cfcfeabd66d (diff) | |
| download | python-apt-a84352261cd34aaa34b3c4507d9d8e6216170050.tar.gz | |
* tests/test_apt_cache.py:
- add additional check if provides test can actually be run
Diffstat (limited to 'tests/test_apt_cache.py')
| -rw-r--r-- | tests/test_apt_cache.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
