Merge lp:~dholbach/help-app/functional-test-template-improvements into lp:~nskaggs/help-app/functional-test-template-improvements

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 161
Proposed branch: lp:~dholbach/help-app/functional-test-template-improvements
Merge into: lp:~nskaggs/help-app/functional-test-template-improvements
Diff against target: 63 lines (+11/-2)
4 files modified
HACKING (+1/-1)
internals/tests/build_utils.py (+4/-1)
internals/tests/functional/help_app/tests/test_app.py (+3/-0)
internals/tests/functional/help_app/tests/test_web.py (+3/-0)
To merge this branch: bzr merge lp:~dholbach/help-app/functional-test-template-improvements
Reviewer Review Type Date Requested Status
Nicholas Skaggs Pending
Review via email: mp+261402@code.launchpad.net
To post a comment you must log in.
162. By Daniel Holbach

move assertion if build worked out into test_app and test_web

163. By Daniel Holbach

move test into setUp of TestApp/TestWeb

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING'
2--- HACKING 2015-05-28 19:34:12 +0000
3+++ HACKING 2015-06-08 15:15:41 +0000
4@@ -171,7 +171,7 @@
5 sudo apt-get install oxideqt-chromedriver
6 sudo apt-add-repository ppa:canonical-platform-qa/selenium
7 sudo apt-get update
8- sudo apt-get install python3-selenium
9+ sudo apt-get install python3-selenium xvfb
10
11 Run the tests:
12
13
14=== modified file 'internals/tests/build_utils.py'
15--- internals/tests/build_utils.py 2015-06-05 15:03:41 +0000
16+++ internals/tests/build_utils.py 2015-06-08 15:15:41 +0000
17@@ -7,6 +7,7 @@
18 sys.path.insert(0, '../..')
19
20 from pelicanconf import TOP_LEVEL_DIR
21+import pelicanconf
22
23
24 def clean_tempdir(tempdir):
25@@ -26,7 +27,9 @@
26 if self.build == 'web':
27 self.env = {'OUTPUTDIR_WEB': self.tempdir}
28 self.pwd = os.getcwd()
29- os.chdir(TOP_LEVEL_DIR)
30+ top_level_dir = os.path.join(os.path.dirname(pelicanconf.__file__),
31+ TOP_LEVEL_DIR)
32+ os.chdir(top_level_dir)
33 self.run_build()
34 self.find_html_files()
35 self.html_path = os.path.commonprefix(self.html_files)
36
37=== modified file 'internals/tests/functional/help_app/tests/test_app.py'
38--- internals/tests/functional/help_app/tests/test_app.py 2015-06-05 15:14:52 +0000
39+++ internals/tests/functional/help_app/tests/test_app.py 2015-06-08 15:15:41 +0000
40@@ -5,6 +5,9 @@
41
42
43 class TestApp(HelpAppTest):
44+ def setUp(self):
45+ super(TestApp, self).setUp()
46+ self.assertEquals(self.app.build_runner.rc, 0)
47
48 def test_basic_launch(self):
49 self.assertThat(self.app, NotEquals(None))
50
51=== modified file 'internals/tests/functional/help_app/tests/test_web.py'
52--- internals/tests/functional/help_app/tests/test_web.py 2015-06-05 15:14:52 +0000
53+++ internals/tests/functional/help_app/tests/test_web.py 2015-06-08 15:15:41 +0000
54@@ -5,6 +5,9 @@
55
56
57 class TestWeb(HelpWebTest):
58+ def setUp(self):
59+ super(TestWeb, self).setUp()
60+ self.assertEquals(self.app.build_runner.rc, 0)
61
62 def test_basic_launch(self):
63 self.assertThat(self.app, NotEquals(None))

Subscribers

People subscribed via source and target branches