-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_tests.py
57 lines (47 loc) · 1.33 KB
/
run_tests.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# run_tests.py
"""unittest test suite so freeze_support can be called globally"""
#
# Copyright (c) 2021 Dan Cutright
# This file is part of IQDM-PDF, released under a MIT license.
# See the file LICENSE included with this distribution, also
import unittest
from tests.test_file_processor import TestFileProcessor
from tests.test_pdf_reader import TestPDFReader
from tests.test_report_parsers import (
TestSNCPatient,
TestSNCPatient2020,
TestDelta4,
TestVerisoft,
)
from tests.test_utilities import TestUtilities
test_classes = [
TestUtilities,
TestFileProcessor,
TestPDFReader,
TestSNCPatient,
TestSNCPatient2020,
TestDelta4,
TestVerisoft,
]
class TestSuite:
def __init__(self):
"""Init test suite can run"""
self.suite = unittest.TestSuite()
self.add_tests()
self.run()
def add_tests(self):
"""Add test classes"""
for test in test_classes:
self.suite.addTest(unittest.makeSuite(test))
def run(self):
"""Run tests"""
runner = unittest.TextTestRunner()
runner.run(self.suite)
if __name__ == "__main__":
import sys
from multiprocessing import freeze_support
freeze_support() # Needed for macOS python >=3.8 and Windows
sys.exit(unittest.main())