diff options
| author | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:50:38 +1000 |
|---|---|---|
| committer | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:50:38 +1000 |
| commit | ad7bc46acd80451de21ce58450edb0f4367a5c79 (patch) | |
| tree | 12775f7901544a709f8d63079f1cd57fef00f5a8 /tests/cache.py | |
| parent | a953d82143f0ec979e18f17e8d9bbacbac954868 (diff) | |
| download | python-apt-ad7bc46acd80451de21ce58450edb0f4367a5c79.tar.gz | |
Fix code indentation to 4 spaces, to conform with PEP 8.
Diffstat (limited to 'tests/cache.py')
| -rw-r--r-- | tests/cache.py | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/tests/cache.py b/tests/cache.py index 34535e68..24732578 100644 --- a/tests/cache.py +++ b/tests/cache.py @@ -8,44 +8,44 @@ import sys def main(): - apt_pkg.init() - cache = apt_pkg.GetCache() - depcache = apt_pkg.GetDepCache(cache) - depcache.Init() - i=0 - all=cache.PackageCount - print "Running Cache test on all packages:" - # first, get all pkgs - for pkg in cache.Packages: - i += 1 - x = pkg.Name - # then get each version - for ver in pkg.VersionList: - # get some version information - a = ver.FileList - b = ver.VerStr - c = ver.Arch - d = ver.DependsListStr - dl = ver.DependsList - # get all dependencies (a dict of string->list, - # e.g. "depends:" -> [ver1,ver2,..] - for dep in dl.keys(): - # get the list of each dependency object - for depVerList in dl[dep]: - for z in depVerList: - # get all TargetVersions of - # the dependency object - for j in z.AllTargets(): - f = j.FileList - g = ver.VerStr - h = ver.Arch - k = ver.DependsListStr - j = ver.DependsList - pass + apt_pkg.init() + cache = apt_pkg.GetCache() + depcache = apt_pkg.GetDepCache(cache) + depcache.Init() + i=0 + all=cache.PackageCount + print "Running Cache test on all packages:" + # first, get all pkgs + for pkg in cache.Packages: + i += 1 + x = pkg.Name + # then get each version + for ver in pkg.VersionList: + # get some version information + a = ver.FileList + b = ver.VerStr + c = ver.Arch + d = ver.DependsListStr + dl = ver.DependsList + # get all dependencies (a dict of string->list, + # e.g. "depends:" -> [ver1,ver2,..] + for dep in dl.keys(): + # get the list of each dependency object + for depVerList in dl[dep]: + for z in depVerList: + # get all TargetVersions of + # the dependency object + for j in z.AllTargets(): + f = j.FileList + g = ver.VerStr + h = ver.Arch + k = ver.DependsListStr + j = ver.DependsList + pass - print "\r%i/%i=%.3f%% " % (i,all,(float(i)/float(all)*100)), + print "\r%i/%i=%.3f%% " % (i,all,(float(i)/float(all)*100)), if __name__ == "__main__": - main() - sys.exit(0) + main() + sys.exit(0) |
