cognitect-labs / test-runner

A test runner for clojure.test
Eclipse Public License 2.0
288 stars 32 forks source link

Limiting tests to a single var with --var/:vars still prints out other namespaces #33

Closed camsaul closed 3 years ago

camsaul commented 3 years ago

If I limit tests to a single var with something like

clojure -X:test :vars '[my.project.core-test/my-test]'

The test runner output still includes output like

Testing my.project.another-namespace-test

Testing my.project.some-other-namespace-test

...

This can be quite noisy in a project with a lot of test namespaces. Should ns-filter also filter out namespaces that aren't present in :vars, if :vars is set? Alternatively maybe test-ns itself should take care of printing the Testing message, but only do so if there are some test vars present in that namespace.

I can PR either change if you'd like.

puredanger commented 3 years ago

test-ns is not something that is going to be quick to change so I'd look instead at filtering ns'es that have no test vars.