diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2014-06-30 11:21:36 +0200 |
|---|---|---|
| committer | Michael Vogt <mvo@debian.org> | 2014-06-30 11:22:28 +0200 |
| commit | 9db885ce4fb06f8e154b97cd6cf4e0f09a241f54 (patch) | |
| tree | 800048e31e28f866927f74d7ff9947c6a0af8bb6 /tests | |
| parent | 1fd7279ca39c22f9a688e404b27bc1f3aef30cc7 (diff) | |
| download | python-apt-9db885ce4fb06f8e154b97cd6cf4e0f09a241f54.tar.gz | |
make pep8 happy (again)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_aptsources.py | 38 | ||||
| -rw-r--r-- | tests/test_debfile_multiarch.py | 2 | ||||
| -rwxr-xr-x | tests/test_pep8.py | 3 |
3 files changed, 22 insertions, 21 deletions
diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index f955205f..f174bd41 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -77,9 +77,9 @@ class TestAptSources(unittest.TestCase): found = False for entry in sources: if (entry.type == "deb" and - entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and - entry.dist == "edgy" and - "multiverse" in entry.comps): + entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and + entry.dist == "edgy" and + "multiverse" in entry.comps): found = True self.assertTrue(found) @@ -90,10 +90,10 @@ class TestAptSources(unittest.TestCase): found = False for entry in sources: if (entry.type == "deb" and - entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and - entry.dist == "natty" and - entry.architectures == [] and - "multiverse" in entry.comps): + entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and + entry.dist == "natty" and + entry.architectures == [] and + "multiverse" in entry.comps): found = True self.assertTrue(found) @@ -104,10 +104,10 @@ class TestAptSources(unittest.TestCase): found = False for entry in sources: if (entry.type == "deb" and - entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and - entry.dist == "natty" and - set(entry.architectures) == set(["amd64", "i386"]) and - set(entry.comps) == set(["main", "universe"])): + entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and + entry.dist == "natty" and + set(entry.architectures) == set(["amd64", "i386"]) and + set(entry.comps) == set(["main", "universe"])): found = True self.assertTrue(found) # test to add something new: multiverse *and* @@ -120,8 +120,8 @@ class TestAptSources(unittest.TestCase): found_something = 0 for entry in sources: if (entry.type == "deb" and - entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and - entry.dist == "edgy"): + entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and + entry.dist == "edgy"): for c in entry.comps: if c == "universe": found_universe += 1 @@ -219,11 +219,11 @@ class TestAptSources(unittest.TestCase): found = {} for entry in sources: if (entry.type == "deb" and - entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and - "edgy" in entry.dist): + entry.uri == "http://de.archive.ubuntu.com/ubuntu/" and + "edgy" in entry.dist): for c in entry.comps: if c == comp: - if not entry.dist in found: + if entry.dist not in found: found[entry.dist] = 0 found[entry.dist] += 1 #print "".join([s.str() for s in sources]) @@ -236,11 +236,11 @@ class TestAptSources(unittest.TestCase): found = {} for entry in sources: if (entry.type == "deb" and - entry.template and - entry.template.name == "edgy"): + entry.template and + entry.template.name == "edgy"): for c in entry.comps: if c == comp: - if not entry.dist in found.has_key: + if entry.dist not in found.has_key: found[entry.dist] = 0 found[entry.dist] += 1 #print "".join([s.str() for s in sources]) diff --git a/tests/test_debfile_multiarch.py b/tests/test_debfile_multiarch.py index 045daf72..f8847838 100644 --- a/tests/test_debfile_multiarch.py +++ b/tests/test_debfile_multiarch.py @@ -39,7 +39,7 @@ class TestDebfileMultiarch(unittest.TestCase): # WARNING: this assumes that lib3ds-1-3 is a non-multiarch lib # use "lib3ds-1-3" as a test to see if non-multiach lib conflicts work canary = "lib3ds-1-3" - if not canary in cache: + if canary not in cache: # TODO: use unittest.skip #logging.warning("skipping test because %s is missing" % canary) return diff --git a/tests/test_pep8.py b/tests/test_pep8.py index 2e1f43fc..b3ec2dba 100755 --- a/tests/test_pep8.py +++ b/tests/test_pep8.py @@ -16,7 +16,8 @@ class PackagePep8TestCase(unittest.TestCase): # E126 continuation line over-indented for hanging indent # E127 continuation line over-indented for visual indent # E128 continuation line under-indented for visual indent - "--ignore=E125,E126,E127,E128", + # E265 block comment should start with '# ' + "--ignore=E125,E126,E127,E128,E265", "--exclude", "build,tests/old", "--repeat", py_dir]) if res != 0: |
