Merge lp:~garyvdm/apt-zeroconf/pep8-fixes into lp:apt-zeroconf

Proposed by Gary van der Merwe
Status: Needs review
Proposed branch: lp:~garyvdm/apt-zeroconf/pep8-fixes
Merge into: lp:apt-zeroconf
Diff against target: 49 lines (+7/-4)
3 files modified
aptzeroconf/http.py (+1/-1)
aptzeroconf/parse.py (+4/-2)
test/test_general.py (+2/-1)
To merge this branch: bzr merge lp:~garyvdm/apt-zeroconf/pep8-fixes
Reviewer Review Type Date Requested Status
Apt Zeroconf Team Pending
Review via email: mp+65001@code.launchpad.net

Description of the change

When I run the test suite, I get some failures in the test_sourcecode. This branch fixes these.

To post a comment you must log in.

Unmerged revisions

129. By Gary van der Merwe

PEP 8 fixes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aptzeroconf/http.py'
2--- aptzeroconf/http.py 2009-09-12 02:04:35 +0000
3+++ aptzeroconf/http.py 2011-06-17 13:59:03 +0000
4@@ -145,7 +145,7 @@
5 @trap_socketerror
6 def do_GET(self):
7 self._do_GET()
8-
9+
10 def _do_GET(self):
11 """
12 Respond to a GET request by proxy the url to preferably local content,
13
14=== modified file 'aptzeroconf/parse.py'
15--- aptzeroconf/parse.py 2009-08-09 02:39:51 +0000
16+++ aptzeroconf/parse.py 2011-06-17 13:59:03 +0000
17@@ -28,14 +28,16 @@
18
19 V2, V3 = 0.2, 0.3
20 EPOCH_PATTERN = {
21- V2 : re.compile(r'\_\d+\%3a'),
22- V3 : re.compile(r'\_\d+\:')
23+ V2: re.compile(r'\_\d+\%3a'),
24+ V3: re.compile(r'\_\d+\:'),
25 }
26
27+
28 def normalize_whitespace(text):
29 """Remove excessive whitespace in spaces."""
30 return ' '.join(text.split())
31
32+
33 def _is_equal(pkg, find, ver):
34 """Are the packages equal disregarding the epoch?"""
35 return EPOCH_PATTERN[ver].sub('_', pkg) == find or pkg == find
36
37=== modified file 'test/test_general.py'
38--- test/test_general.py 2009-08-09 03:57:29 +0000
39+++ test/test_general.py 2011-06-17 13:59:03 +0000
40@@ -126,7 +126,8 @@
41
42 def test_download_epoch_local_server(tmpdir):
43 """
44- Test fetching a file with an epoch from an AZC instance on the local network.
45+ Test fetching a file with an epoch from an AZC instance on the local
46+ network.
47 """
48 # cachedir is the directory to serve debs out of
49 one = path.join(str(tmpdir), 'one')

Subscribers

People subscribed via source and target branches