You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial debugging steps
Before creating a report, especially around exceptions being thrown when running Leiningen, please check if the error still occurs after:
Updating to using the latest released version of Leiningen (lein upgrade).
Moving your ~/.lein/profiles.clj (if present) out of the way. This contains third-party dependencies and plugins that can cause problems inside Leiningen.
Updating any old versions of plugins in your project.clj, especially if the problem is with a plugin not working. Old versions of plugins like nREPL and CIDER (as well as others) can cause problems with newer versions of Leiningen.
(If you are using Java 9 or newer), updating your dependencies to their most recent versions. Recent JDK's have introduced changes which can break some Clojure libraries.
Describe the bug
When a test fails, I expect to be able to copy-paste the suggested lein test :only ... log into a shell to reproduce the issue.
However, if an exception is thrown in a test fixture, a strange suggestion is printed with the namespace and name of the symbol being identical.
For example, if the test is in namespace foo.bar, the suggestion command is lein test :only foo.bar/foo.bar.
To Reproduce
Steps to reproduce the behavior:
Attach a test fixture to a test using clojure.test/use-fixtures (using :each or :only) and clojure.test/deftest.
Run lein test such that the test in step 1 is run.
See that suggested lein test :only .. command is wrong.
Actual behavior
An irrelevant lein test :only ... suggestion was printed.
Expected behavior
Either:
no lein test :only ... suggestion is printed
a lein test :only <the-ns> suggestion is printed that runs all tests in the namespace (perhaps this is the best alternative for :once fixtures)
a lein test :only <the-ns>/<the-test suggestion is printed (perhaps for :each fixtures).
some other explanation that this failure may be difficult to reproduce
Initial debugging steps
Before creating a report, especially around exceptions being thrown when running Leiningen, please check if the error still occurs after:
lein upgrade
).~/.lein/profiles.clj
(if present) out of the way. This contains third-party dependencies and plugins that can cause problems inside Leiningen.project.clj
, especially if the problem is with a plugin not working. Old versions of plugins like nREPL and CIDER (as well as others) can cause problems with newer versions of Leiningen.Describe the bug
When a test fails, I expect to be able to copy-paste the suggested
lein test :only ...
log into a shell to reproduce the issue.However, if an exception is thrown in a test fixture, a strange suggestion is printed with the namespace and name of the symbol being identical.
For example, if the test is in namespace
foo.bar
, the suggestion command islein test :only foo.bar/foo.bar
.To Reproduce
Steps to reproduce the behavior:
clojure.test/use-fixtures
(using:each
or:only
) andclojure.test/deftest
.lein test
such that the test in step 1 is run.lein test :only ..
command is wrong.Actual behavior
An irrelevant
lein test :only ...
suggestion was printed.Expected behavior
Either:
lein test :only ...
suggestion is printedlein test :only <the-ns>
suggestion is printed that runs all tests in the namespace (perhaps this is the best alternative for:once
fixtures)lein test :only <the-ns>/<the-test
suggestion is printed (perhaps for:each
fixtures).Link to sample project
https://github.com/frenchy64/fixture-only
Logs
Environment
The text was updated successfully, but these errors were encountered: