(testsuite_module_path: str)
| 426 | |
| 427 | |
| 428 | def get_test_suites(testsuite_module_path: str) -> list[type[TestSuite]]: |
| 429 | def is_test_suite(object) -> bool: |
| 430 | try: |
| 431 | if issubclass(object, TestSuite) and object is not TestSuite: |
| 432 | return True |
| 433 | except TypeError: |
| 434 | return False |
| 435 | return False |
| 436 | |
| 437 | try: |
| 438 | testcase_module = importlib.import_module(testsuite_module_path) |
| 439 | except ModuleNotFoundError as e: |
| 440 | raise ConfigurationError(f"Test suite '{testsuite_module_path}' not found.") from e |
| 441 | return [ |
| 442 | test_suite_class |
| 443 | for _, test_suite_class in inspect.getmembers(testcase_module, is_test_suite) |
| 444 | ] |
no test coverage detected