-
Notifications
You must be signed in to change notification settings - Fork 0
/
coverage_test.py
34 lines (25 loc) · 897 Bytes
/
coverage_test.py
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
28
29
30
31
32
33
"""
Run the maximum of tests to have good coverage test.
"""
import os
import imp
def main():
import doctest, pdb
if doctest._OutputRedirectingPdb.set_trace == pdb.Pdb.set_trace:
raise ImportError("Your doctest version is too old")
directory = os.getenv("TESTCASE")
if not directory:
home = os.getenv("HOME")
assert home
directory = os.path.join(home, "testcase")
parser = imp.load_source("parser", "hachoir-parser/tests/run_testcase.py")
parser.testRandom()
parser.testFiles(directory)
metadata = imp.load_source("metadata", "hachoir-metadata/run_testcase.py")
metadata.testFiles(directory)
core_doc = imp.load_source("parser", "hachoir-core/test_doc.py")
core_doc.main()
metadata_doc = imp.load_source("parser", "hachoir-metadata/test_doc.py")
metadata_doc.main()
if __name__ == "__main__":
main()