summaryrefslogtreecommitdiffhomepage
path: root/test/run.py
blob: 384663f9747e5783db92cb1c5937a68fefe17814 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3
import os
import sys
import unittest

if __name__ == '__main__':
    loader = unittest.TestLoader()
    suite  = unittest.TestSuite()

    this_dir = os.path.dirname(__file__)
    tests = loader.discover(start_dir=this_dir)
    suite.addTests(tests)

    runner = unittest.TextTestRunner(stream=sys.stdout, verbosity=3)
    result = runner.run(suite)

    ret = not (len(result.failures) == len(result.errors) == 0)

    sys.exit(ret)