# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2025 PyThaiNLP Project # SPDX-FileType: SOURCE # SPDX-License-Identifier: Apache-2.0 """ Unit test. Compact version. Test functions that require "compact" dependencies (see setup.py). """ from unittest import TestLoader, TestSuite # Names of module to be tested test_packages: list[str] = [ "tests.compact.testc_parse", "tests.compact.testc_tokenize", "tests.compact.testc_tools", "tests.compact.testc_transliterate", "tests.compact.testc_util", ] 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()