Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail if testOnly does not match any test case #3224

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Fail if testOnly does not match any test case #3224

merged 2 commits into from
Jun 21, 2024

Conversation

lefou
Copy link
Member

@lefou lefou commented Jun 21, 2024

If there is a typo in the filter string, it can happen, that no test were executed at all. This can go unnoticed, which is typically not what the user wants. Therefore we fail the testOnly target if executed test count is zero.

> mill foo.test.testOnly MyTest
...
1 target failed
foo.test.testOnly Test selector does not match any test: MyTest
Run discoveredTestClasses to see available tests

Fix #3204

Pull request: #3224

```
> mill foo.test.testOnly MyTest
...
1 target failed
foo.test.testOnly Test selector does not match any test: MyTest
Run discoveredTestClasses to see available tests
```

Fix #3204
@lefou lefou merged commit 53fce63 into main Jun 21, 2024
39 checks passed
@lefou lefou deleted the fail-testonly branch June 21, 2024 09:57
@lefou lefou added this to the 0.11.8 milestone Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestModule.testOnly should fail if no tests were matched
2 participants