forked from 67372a/LyCORIS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunit-test.py
More file actions
36 lines (27 loc) · 793 Bytes
/
Copy pathunit-test.py
File metadata and controls
36 lines (27 loc) · 793 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
33
34
35
36
import unittest
import logging
import coverage
cov = coverage.Coverage()
cov.start()
from lycoris.logging import logger
logger.setLevel(logging.ERROR)
from test.module import LycorisModuleTests
from test.wrapper import LycorisWrapperTests
from test.functional import LycorisFunctionalTests
from test.kohya import LycorisKohyaWrapperTests
TESTS = [
LycorisModuleTests,
LycorisFunctionalTests,
LycorisWrapperTests,
LycorisKohyaWrapperTests,
]
if __name__ == "__main__":
test_loader = unittest.TestLoader()
runner = unittest.TextTestRunner(verbosity=0)
for test in TESTS:
suite = test_loader.loadTestsFromTestCase(test)
result = runner.run(suite)
cov.stop()
cov.save()
cov.report()
cov.html_report(directory="coverage_report")