diff options
| author | Michael Vogt <mvo@debian.org> | 2013-12-31 23:25:13 +0100 |
|---|---|---|
| committer | Michael Vogt <mvo@debian.org> | 2014-01-05 20:04:30 +0100 |
| commit | 3bf9c3fe4d19ed4d985dc8b7747a737699f46a7e (patch) | |
| tree | 75ad948c351605fd7ac50b176f1149c4e2a513e4 /tests/old | |
| parent | e3c26754af1891d2c50993730467fc9335ec5f09 (diff) | |
| download | python-apt-3bf9c3fe4d19ed4d985dc8b7747a737699f46a7e.tar.gz | |
make test_pep8.py pass
Diffstat (limited to 'tests/old')
| -rw-r--r-- | tests/old/__init__.py | 1 | ||||
| -rw-r--r-- | tests/old/cache.py | 4 | ||||
| -rw-r--r-- | tests/old/depcache.py | 6 | ||||
| -rw-r--r-- | tests/old/pkgproblemresolver.py | 6 | ||||
| -rw-r--r-- | tests/old/pkgrecords.py | 2 | ||||
| -rw-r--r-- | tests/old/pkgsrcrecords.py | 2 | ||||
| -rwxr-xr-x | tests/old/refcount.py | 5 |
7 files changed, 12 insertions, 14 deletions
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() |
