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
=== modified file 'Makefile'
--- Makefile 2015-02-26 16:26:57 +0000
+++ Makefile 2015-03-06 14:34:40 +0000
@@ -7,6 +7,9 @@
7 $(foreach fn, $(ignored), $(shell rm -r $(fn);))7 $(foreach fn, $(ignored), $(shell rm -r $(fn);))
8endif8endif
99
10check:
11 make -C edit-here check
12
10click: html13click: html
11 cd app && click build . && mv *.click ..14 cd app && click build . && mv *.click ..
1215
@@ -19,4 +22,4 @@
19update-pot:22update-pot:
20 cd edit-here && ./generate-pot23 cd edit-here && ./generate-pot
2124
22.PHONY: click html web update-pot clean25.PHONY: click html web update-pot clean check
2326
=== modified file 'edit-here/Makefile'
--- edit-here/Makefile 2015-03-06 10:32:59 +0000
+++ edit-here/Makefile 2015-03-06 14:34:40 +0000
@@ -60,6 +60,9 @@
60 @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'60 @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
61 @echo ' '61 @echo ' '
6262
63check:
64 ./run-tests
65
63web:66web:
64 ./generate-translations67 ./generate-translations
65 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR_WEB) -s $(CONFFILE) $(PELICANOPTS) -t $(THEMEDIR_WEB)68 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR_WEB) -s $(CONFFILE) $(PELICANOPTS) -t $(THEMEDIR_WEB)
6669
=== added file 'edit-here/run-tests'
--- edit-here/run-tests 1970-01-01 00:00:00 +0000
+++ edit-here/run-tests 2015-03-06 14:34:40 +0000
@@ -0,0 +1,12 @@
1#!/usr/bin/python3
2
3import sys
4import unittest
5
6test_directory = 'tests/'
7test_filename = 'test_*'
8if len(sys.argv) > 1:
9 test_filename = sys.argv[1]
10
11suite = unittest.TestLoader().discover(test_directory, pattern=test_filename)
12unittest.TextTestRunner(verbosity=2).run(suite)
013
=== added directory 'edit-here/tests'
=== added file 'edit-here/tests/test_files.py'
--- edit-here/tests/test_files.py 1970-01-01 00:00:00 +0000
+++ edit-here/tests/test_files.py 2015-03-06 14:34:40 +0000
@@ -0,0 +1,14 @@
1import os
2from unittest import TestCase
3
4import translations
5
6class HelpTestCase(TestCase):
7 def __init__(self, *args):
8 self.translations = translations.Translations()
9 TestCase.__init__(self, *args)
10
11 def test_doc_files_size_not_0(self):
12 sizes = [os.stat(fn).st_size
13 for fn in self.translations.documents.docs]
14 self.assertNotIn(0, sizes)

Subscribers

People subscribed via source and target branches