scalameta / munit

Scala testing library with actionable errors and extensible APIs
https://scalameta.org/munit
Apache License 2.0
428 stars 88 forks source link

Don't print test suite name if no test is being run #779

Closed alexarchambault closed 3 months ago

alexarchambault commented 3 months ago

These changes make munit print only the test suite names of suites for which it actually ran tests, rather than printing all suite names (even those for which all tests are being filtered out), as it's been doing up to now.

For example, instead of printing things like

$ ./mill -i -w scala.integration.test "almond.integration.KernelTestsSimple3.completion"
…
almond.integration.KernelTestsSimple3:
  + completion 17.073s
almond.integration.KernelTestsTwoStepStartup3:
almond.integration.KernelTestsSimple213:
almond.integration.KernelTestsTwoStepStartup212:
almond.integration.KernelTestsTwoStepStartup213:
almond.integration.KernelTestsSimple212:

it now prints

$ ./mill -i -w scala.integration.test "almond.integration.KernelTestsSimple3.completion"
…
almond.integration.KernelTestsSimple3:
  + completion 15.468s

I find the latter to be more readable.

alexarchambault commented 3 months ago

Not sure how to test that, or if it needs to be tested. (Going to see if it break things on the CI here…)

Manual tests show that it works as expected, at least.