From 3bf9c3fe4d19ed4d985dc8b7747a737699f46a7e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 31 Dec 2013 23:25:13 +0100 Subject: make test_pep8.py pass --- tests/old/__init__.py | 1 - tests/old/cache.py | 4 ++-- tests/old/depcache.py | 6 +++--- tests/old/pkgproblemresolver.py | 6 +++--- tests/old/pkgrecords.py | 2 +- tests/old/pkgsrcrecords.py | 2 +- tests/old/refcount.py | 5 ++--- 7 files changed, 12 insertions(+), 14 deletions(-) (limited to 'tests/old') diff --git a/tests/old/__init__.py b/tests/old/__init__.py index afd0f074..e93c0b65 100644 --- a/tests/old/__init__.py +++ b/tests/old/__init__.py @@ -2,7 +2,6 @@ import os import unittest - if __name__ == '__main__': os.chdir(os.path.dirname(__file__)) print os.getcwd() diff --git a/tests/old/cache.py b/tests/old/cache.py index 11156c00..5cbf19d9 100644 --- a/tests/old/cache.py +++ b/tests/old/cache.py @@ -12,8 +12,8 @@ def main(): cache = apt_pkg.Cache() depcache = apt_pkg.DepCache(cache) depcache.init() - i=0 - all=cache.package_count + i = 0 + all = cache.package_count print "Running Cache test on all packages:" # first, get all pkgs for pkg in cache.packages: diff --git a/tests/old/depcache.py b/tests/old/depcache.py index cc030ed0..67a47503 100644 --- a/tests/old/depcache.py +++ b/tests/old/depcache.py @@ -12,8 +12,8 @@ def main(): cache = apt_pkg.Cache() depcache = apt_pkg.DepCache(cache) depcache.init() - i=0 - all=cache.package_count + i = 0 + all = cache.package_count print "Running DepCache test on all packages" print "(trying to install each and then mark it keep again):" # first, get all pkgs @@ -21,7 +21,7 @@ def main(): i += 1 x = pkg.name # then get each version - ver =depcache.get_candidate_ver(pkg) + ver = depcache.get_candidate_ver(pkg) if ver is not None: depcache.mark_install(pkg) if depcache.inst_count == 0: diff --git a/tests/old/pkgproblemresolver.py b/tests/old/pkgproblemresolver.py index 7714c882..feaa3cb1 100644 --- a/tests/old/pkgproblemresolver.py +++ b/tests/old/pkgproblemresolver.py @@ -12,8 +12,8 @@ def main(): cache = apt_pkg.Cache() depcache = apt_pkg.DepCache(cache) depcache.init() - i=0 - all=cache.package_count + i = 0 + all = cache.package_count print "Running DepCache test on all packages" print "(trying to install each and then mark it keep again):" # first, get all pkgs @@ -21,7 +21,7 @@ def main(): i += 1 x = pkg.name # then get each version - ver =depcache.get_candidate_ver(pkg) + ver = depcache.get_candidate_ver(pkg) if ver is not None: depcache.mark_install(pkg) if depcache.broken_count > 0: diff --git a/tests/old/pkgrecords.py b/tests/old/pkgrecords.py index 9e06d44c..3f253bf3 100644 --- a/tests/old/pkgrecords.py +++ b/tests/old/pkgrecords.py @@ -13,7 +13,7 @@ def main(): cache = apt_pkg.Cache() depcache = apt_pkg.DepCache(cache) depcache.init() - i=0 + i = 0 print "Running PkgRecords test on all packages:" for pkg in cache.packages: i += 1 diff --git a/tests/old/pkgsrcrecords.py b/tests/old/pkgsrcrecords.py index 36790eff..42b545ed 100644 --- a/tests/old/pkgsrcrecords.py +++ b/tests/old/pkgsrcrecords.py @@ -11,7 +11,7 @@ import sys def main(): apt_pkg.init() cache = apt_pkg.Cache() - i=0 + i = 0 print "Running PkgSrcRecords test on all packages:" for x in cache.packages: i += 1 diff --git a/tests/old/refcount.py b/tests/old/refcount.py index a80595c9..70adc0c1 100755 --- a/tests/old/refcount.py +++ b/tests/old/refcount.py @@ -1,14 +1,13 @@ #!/usr/bin/python-dbg -from pprint import pprint, pformat +from pprint import pprint import apt import sys import gc -import difflib # get initial cache print sys.gettotalrefcount() -progress= apt.progress.OpTextProgress() +progress = apt.progress.OpTextProgress() c = apt.Cache(progress) print "refcount after first cache instance: ", sys.gettotalrefcount() -- cgit v1.2.3