(test_name: TestName, test_dir: StrPath | None)
| 515 | |
| 516 | |
| 517 | def abs_module_name(test_name: TestName, test_dir: StrPath | None) -> TestName: |
| 518 | if test_name.startswith('test.') or test_dir: |
| 519 | return test_name |
| 520 | else: |
| 521 | # Import it from the test package |
| 522 | return 'test.' + test_name |
| 523 | |
| 524 | |
| 525 | # gh-90681: When rerunning tests, we might need to rerun the whole |