~dholbach/help-app/1428676

« back to all changes in this revision

Viewing changes to edit-here/run-tests

  • Committer: Daniel Holbach
  • Date: 2015-03-06 14:32:59 UTC
  • Revision ID: daniel.holbach@canonical.com-20150306143259-i60ev6uk3p7gok6p
add *very* basic test-suite, should be modular and easy enough to extend - plus: the package build process should pick up 'make check'

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python3
 
2
 
 
3
import sys
 
4
import unittest
 
5
 
 
6
test_directory = 'tests/'
 
7
test_filename = 'test_*'
 
8
if len(sys.argv) > 1:
 
9
    test_filename = sys.argv[1]
 
10
 
 
11
suite = unittest.TestLoader().discover(test_directory, pattern=test_filename)
 
12
unittest.TextTestRunner(verbosity=2).run(suite)