File size: 780 Bytes
e4b9a7b | 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 | # -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: 2016-2025 PyThaiNLP Project
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0
"""
Unit test.
Each file in tests/ is for each main package.
"""
from unittest import TestLoader, TestSuite
# Names of module to be tested
test_packages: list[str] = [
"tests.core",
"tests.compact",
]
def load_tests(
loader: TestLoader, standard_tests: TestSuite, pattern: str
) -> TestSuite:
"""Load test protocol
See: https://docs.python.org/3/library/unittest.html#id1
"""
suite = TestSuite()
for test_package in test_packages:
tests = loader.loadTestsFromName(test_package)
suite.addTests(tests)
return suite
if __name__ == "__main__":
import unittest
unittest.main()
|