Merge lp:~dholbach/help-app/1428676 into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 79
Proposed branch: lp:~dholbach/help-app/1428676
Merge into: lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
Diff against target: 70 lines (+33/-1)
4 files modified
Makefile (+4/-1)
edit-here/Makefile (+3/-0)
edit-here/run-tests (+12/-0)
edit-here/tests/test_files.py (+14/-0)
To merge this branch: bzr merge lp:~dholbach/help-app/1428676
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Review via email: mp+252117@code.launchpad.net
To post a comment you must log in.
lp:~dholbach/help-app/1428676 updated
77. By Daniel Holbach

add initial test

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

LTGM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2015-02-26 16:26:57 +0000
3+++ Makefile 2015-03-06 14:34:40 +0000
4@@ -7,6 +7,9 @@
5 $(foreach fn, $(ignored), $(shell rm -r $(fn);))
6 endif
7
8+check:
9+ make -C edit-here check
10+
11 click: html
12 cd app && click build . && mv *.click ..
13
14@@ -19,4 +22,4 @@
15 update-pot:
16 cd edit-here && ./generate-pot
17
18-.PHONY: click html web update-pot clean
19+.PHONY: click html web update-pot clean check
20
21=== modified file 'edit-here/Makefile'
22--- edit-here/Makefile 2015-03-06 10:32:59 +0000
23+++ edit-here/Makefile 2015-03-06 14:34:40 +0000
24@@ -60,6 +60,9 @@
25 @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
26 @echo ' '
27
28+check:
29+ ./run-tests
30+
31 web:
32 ./generate-translations
33 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR_WEB) -s $(CONFFILE) $(PELICANOPTS) -t $(THEMEDIR_WEB)
34
35=== added file 'edit-here/run-tests'
36--- edit-here/run-tests 1970-01-01 00:00:00 +0000
37+++ edit-here/run-tests 2015-03-06 14:34:40 +0000
38@@ -0,0 +1,12 @@
39+#!/usr/bin/python3
40+
41+import sys
42+import unittest
43+
44+test_directory = 'tests/'
45+test_filename = 'test_*'
46+if len(sys.argv) > 1:
47+ test_filename = sys.argv[1]
48+
49+suite = unittest.TestLoader().discover(test_directory, pattern=test_filename)
50+unittest.TextTestRunner(verbosity=2).run(suite)
51
52=== added directory 'edit-here/tests'
53=== added file 'edit-here/tests/test_files.py'
54--- edit-here/tests/test_files.py 1970-01-01 00:00:00 +0000
55+++ edit-here/tests/test_files.py 2015-03-06 14:34:40 +0000
56@@ -0,0 +1,14 @@
57+import os
58+from unittest import TestCase
59+
60+import translations
61+
62+class HelpTestCase(TestCase):
63+ def __init__(self, *args):
64+ self.translations = translations.Translations()
65+ TestCase.__init__(self, *args)
66+
67+ def test_doc_files_size_not_0(self):
68+ sizes = [os.stat(fn).st_size
69+ for fn in self.translations.documents.docs]
70+ self.assertNotIn(0, sizes)

Subscribers

People subscribed via source and target branches