summaryrefslogtreecommitdiff
path: root/tests/test_progress.py
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-31 23:25:13 +0100
committerMichael Vogt <mvo@debian.org>2014-01-05 20:04:30 +0100
commit3bf9c3fe4d19ed4d985dc8b7747a737699f46a7e (patch)
tree75ad948c351605fd7ac50b176f1149c4e2a513e4 /tests/test_progress.py
parente3c26754af1891d2c50993730467fc9335ec5f09 (diff)
downloadpython-apt-3bf9c3fe4d19ed4d985dc8b7747a737699f46a7e.tar.gz
make test_pep8.py pass
Diffstat (limited to 'tests/test_progress.py')
-rw-r--r--tests/test_progress.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_progress.py b/tests/test_progress.py
index 508da7d4..01cd8a2d 100644
--- a/tests/test_progress.py
+++ b/tests/test_progress.py
@@ -12,6 +12,7 @@ import apt
import apt_pkg
import os
+
class TestAcquireProgress(apt.progress.base.AcquireProgress):
def pulse(self, owner):
self.pulsed = True
@@ -19,6 +20,7 @@ class TestAcquireProgress(apt.progress.base.AcquireProgress):
# but often this is forgoten (and causes odd error messages)
# so the lib supports it. we test the lack of support value here
+
class TestProgress(unittest.TestCase):
def setUp(self):
@@ -35,7 +37,7 @@ class TestProgress(unittest.TestCase):
apt_pkg.config.set("Dir::state::lists", "./tmp")
# create artifical line
deb_line = "deb file:%s/data/fake-packages/ /\n" % basedir
- with open("fetch_sources.list","w") as fobj:
+ with open("fetch_sources.list", "w") as fobj:
fobj.write(deb_line)
apt_pkg.config.set("Dir::Etc::sourcelist", "fetch_sources.list")
apt_pkg.config.clear("APT::Update::Post-Invoke")
@@ -47,5 +49,6 @@ class TestProgress(unittest.TestCase):
cache.update(progress)
self.assertTrue(progress.pulsed)
+
if __name__ == "__main__":
unittest.main()