summaryrefslogtreecommitdiff
path: root/suite/unit_api.py
blob: 3c93e823f03f7c27139e76ee1ab9bbe3f09a3bde (plain)
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
27
#!/usr/bin/env python
# This test file is maintained for API unit test distribution.
import os
import sys
import unittest
import pickle
import zipfile
import difflib
from collections import Counter

api_suite_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "api", "suite")
sys.path.append(api_suite_path)
import testcommon
import api_test

global verbose
verbose = False

if __name__ == "__main__":
    if len(sys.argv) > 1:
        for i in range(1, len(sys.argv)):
            if sys.argv[i] == '-v' or sys.argv[i] == '-V' or sys.argv[i] == '--verbose':
                verbose = True

    test_suite = unittest.defaultTestLoader.loadTestsFromModule(api_test)
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(test_suite)