From add08632b8a66c7ba5de7ab44d8a10ec9462692e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 17 Nov 2011 17:57:34 +0100 Subject: 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() --- tests/test_apt_cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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)) -- cgit v1.2.3