~nskaggs/help-app/functional-test-template

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python3

import os
import sys
import unittest

from pelicanconf import TOP_LEVEL_DIR

test_directory = os.path.join(TOP_LEVEL_DIR, 'internals/tests')
test_filename = 'test_*'
if len(sys.argv) > 1:
    test_filename = sys.argv[1]

suite = unittest.TestLoader().discover(test_directory, pattern=test_filename)
res = unittest.TextTestRunner(verbosity=2).run(suite)
if res.failures or res.errors:
    sys.exit(1)