diff options
| author | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:11:06 +1000 |
|---|---|---|
| committer | Ben Finney <ben@benfinney.id.au> | 2008-05-16 16:11:06 +1000 |
| commit | a953d82143f0ec979e18f17e8d9bbacbac954868 (patch) | |
| tree | 42e76c37d72847d4fe3ca2487e227ae1649ad3c0 /tests | |
| parent | 21ef2ab57d68de87a2b44a23d9a3bfb87d24d46d (diff) | |
| download | python-apt-a953d82143f0ec979e18f17e8d9bbacbac954868.tar.gz | |
Fixes to blank lines, to conform with PEP 8.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cache.py | 2 | ||||
| -rw-r--r-- | tests/depcache.py | 1 | ||||
| -rw-r--r-- | tests/lock.py | 1 | ||||
| -rw-r--r-- | tests/pkgproblemresolver.py | 1 | ||||
| -rw-r--r-- | tests/pkgrecords.py | 2 | ||||
| -rw-r--r-- | tests/pkgsrcrecords.py | 2 | ||||
| -rw-r--r-- | tests/test_aptsources.py | 3 |
7 files changed, 11 insertions, 1 deletions
diff --git a/tests/cache.py b/tests/cache.py index 3ec87b40..34535e68 100644 --- a/tests/cache.py +++ b/tests/cache.py @@ -6,6 +6,7 @@ import apt_pkg import sys + def main(): apt_pkg.init() cache = apt_pkg.GetCache() @@ -44,6 +45,7 @@ def main(): print "\r%i/%i=%.3f%% " % (i,all,(float(i)/float(all)*100)), + if __name__ == "__main__": main() sys.exit(0) diff --git a/tests/depcache.py b/tests/depcache.py index 5c78c3a1..635fea14 100644 --- a/tests/depcache.py +++ b/tests/depcache.py @@ -6,6 +6,7 @@ import apt_pkg import sys + def main(): apt_pkg.init() cache = apt_pkg.GetCache() diff --git a/tests/lock.py b/tests/lock.py index 86d704ea..a3d962d7 100644 --- a/tests/lock.py +++ b/tests/lock.py @@ -44,4 +44,3 @@ if __name__ == "__main__": fd = apt_pkg.GetLock(lock,True) print "Lockfile fd (child): %s" % fd sys.exit(0) - diff --git a/tests/pkgproblemresolver.py b/tests/pkgproblemresolver.py index 0ed32ea6..546e2f16 100644 --- a/tests/pkgproblemresolver.py +++ b/tests/pkgproblemresolver.py @@ -6,6 +6,7 @@ import apt_pkg import sys + def main(): apt_pkg.init() cache = apt_pkg.GetCache() diff --git a/tests/pkgrecords.py b/tests/pkgrecords.py index 43723569..308505f7 100644 --- a/tests/pkgrecords.py +++ b/tests/pkgrecords.py @@ -7,6 +7,7 @@ import apt_pkg import sys + def main(): apt_pkg.init() cache = apt_pkg.GetCache() @@ -31,6 +32,7 @@ def main(): pass print "\r%i/%i=%.3f%% " % (i,cache.PackageCount, (float(i)/float(cache.PackageCount)*100)), + if __name__ == "__main__": main() sys.exit(0) diff --git a/tests/pkgsrcrecords.py b/tests/pkgsrcrecords.py index 06c4a1ef..410140c8 100644 --- a/tests/pkgsrcrecords.py +++ b/tests/pkgsrcrecords.py @@ -7,6 +7,7 @@ import apt_pkg import sys + def main(): apt_pkg.init() cache = apt_pkg.GetCache() @@ -20,6 +21,7 @@ def main(): pass print "\r%i/%i=%.3f%% " % (i,cache.PackageCount, (float(i)/float(cache.PackageCount)*100)), + if __name__ == "__main__": main() sys.exit(0) diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 734503d2..08c8194a 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -6,7 +6,9 @@ import apt_pkg import os import copy + class TestAptSources(unittest.TestCase): + def __init__(self, methodName): unittest.TestCase.__init__(self, methodName) apt_pkg.init() @@ -123,5 +125,6 @@ class TestAptSources(unittest.TestCase): for key in found: self.assertEqual(found[key], 1) + if __name__ == "__main__": unittest.main() |
