Find the package root and run the tests for the given tasks
(task_list: List[str])
| 310 | |
| 311 | @positional_deprecated |
| 312 | def run_task_tests(task_list: List[str]): |
| 313 | """ |
| 314 | Find the package root and run the tests for the given tasks |
| 315 | """ |
| 316 | import pytest |
| 317 | |
| 318 | package_root = find_test_root(start_path=pathlib.Path(__file__)) |
| 319 | task_string = " or ".join(task_list) |
| 320 | args = [ |
| 321 | f"{package_root}/tests/test_version_stable.py", |
| 322 | f"--rootdir={package_root}", |
| 323 | "-k", |
| 324 | f"{task_string}", |
| 325 | ] |
| 326 | sys.path.append(str(package_root)) |
| 327 | pytest_return_val = pytest.main(args) |
| 328 | if pytest_return_val: |
| 329 | raise ValueError( |
| 330 | f"Not all tests for the specified tasks ({task_list}) ran successfully! Error code: {pytest_return_val}" |
| 331 | ) |
| 332 | |
| 333 | |
| 334 | def get_git_commit_hash(): |
no test coverage detected