Merge lp:~dholbach/help-app/fix-automated-testing-content-build into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 87
Proposed branch: lp:~dholbach/help-app/fix-automated-testing-content-build
Merge into: lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
Diff against target: 27 lines (+7/-3)
1 file modified
edit-here/tests/test_links.py (+7/-3)
To merge this branch: bzr merge lp:~dholbach/help-app/fix-automated-testing-content-build
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Review via email: mp+252449@code.launchpad.net
To post a comment you must log in.
88. By Daniel Holbach

make pep8 happy

Revision history for this message
Nicholas Skaggs (nskaggs) :
review: Needs Fixing
89. By Daniel Holbach

simplify logic somewhat

Revision history for this message
Nicholas Skaggs (nskaggs) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'edit-here/tests/test_links.py'
2--- edit-here/tests/test_links.py 2015-03-09 15:04:32 +0000
3+++ edit-here/tests/test_links.py 2015-03-10 15:00:30 +0000
4@@ -10,8 +10,12 @@
5
6 def require_build(build):
7 tempdir = tempfile.mkdtemp()
8- ret = subprocess.call(['make', '-es', build],
9- env={'OUTPUTDIR': tempdir})
10+ env = {}
11+ if build == 'html':
12+ env = {'OUTPUTDIR': tempdir}
13+ if build == 'web':
14+ env = {'OUTPUTDIR_WEB': tempdir}
15+ ret = subprocess.call(['make', '-es', build], env=env)
16 return (ret, tempdir)
17
18
19@@ -28,7 +32,7 @@
20 for name, value in attrs:
21 if name == "href":
22 url = urllib.parse.urlparse(value)
23- if not url.netloc or url.netloc == 'localhost':
24+ if value != '#' and url.netloc in [None, '', 'localhost']:
25 self.links += [value]
26
27 def reload(self):

Subscribers

People subscribed via source and target branches