summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-17 17:57:34 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-17 17:57:34 +0100
commitadd08632b8a66c7ba5de7ab44d8a10ec9462692e (patch)
tree0365f91dfffed677d1e298989875eb5e7134e47b /tests
parentf2cd844828de310dc510505612395ef60ded8731 (diff)
downloadpython-apt-add08632b8a66c7ba5de7ab44d8a10ec9462692e.tar.gz
allow Dependency object to be iteratable, this allows to write
code like: for or_dep_group in pkg.candidate.dependencies: for dep in or_dep_group: do_something()
Diffstat (limited to 'tests')
-rw-r--r--tests/test_apt_cache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py
index 0d80f617..7784a25f 100644
--- a/tests/test_apt_cache.py
+++ b/tests/test_apt_cache.py
@@ -55,8 +55,8 @@ class TestAptCache(unittest.TestCase):
# that is possible and does not crash
for pkg in cache:
if pkg.candidate:
- for or_dep in pkg.candidate.dependencies:
- for dep in or_dep.or_dependencies:
+ for or_deps in pkg.candidate.dependencies:
+ for dep in or_deps:
self.assertTrue(dep.name)
self.assertTrue(isinstance(dep.relation, str))
self.assertTrue(dep.pre_depend in (True, False))