File: runtests.py

package info (click to toggle)
python-libnacl 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 488 kB
  • sloc: python: 2,634; makefile: 149; sh: 3
file content (26 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Import python libs
import os
import sys
import unittest

NACL_ROOT = os.path.abspath(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
UNIT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'unit'))

sys.path.insert(0, NACL_ROOT)


def run_suite(path=UNIT_ROOT):
    '''
    Execute the unttest suite
    '''
    loader = unittest.TestLoader()
    tests = loader.discover(path)
    unittest.TextTestRunner(verbosity=2).run(tests)



if __name__ == '__main__':
    run_suite()