-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.py
More file actions
32 lines (23 loc) · 896 Bytes
/
runner.py
File metadata and controls
32 lines (23 loc) · 896 Bytes
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
# tests/runner.py
import unittest
# import your test modules
import test_calc
import test_employee
import test_reader
import test_scheduler
# alltests = unittest.TestSuite([test_calc.suiteCalc(), test_employee.suiteEmployee()])
# unittest.TextTestRunner(verbosity=2).run(alltests)
# initialize the test suite
loader = unittest.TestLoader()
suite = unittest.TestSuite()
# def load_tests(loader, standard_tests, pattern):
# # standard_tests.addTests(package_tests)
# return suite # standard_tests
# add tests to the test suite
suite.addTests(loader.loadTestsFromModule(test_calc))
suite.addTests(loader.loadTestsFromModule(test_employee))
suite.addTests(loader.loadTestsFromModule(test_reader))
suite.addTests(loader.loadTestsFromModule(test_scheduler))
# initialize a runner, pass it your suite and run it
runner = unittest.TextTestRunner(verbosity=3)
result = runner.run(suite)