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
platform
Windows (also repro'ed on linux bb in WSL)
problem
If a deftest exists inside a conditional (e.g. a when), and the condition is false, the :test meta appears to get created as a list instead of a function (as though it were quoted), and the test still tries to execute when the ns is tested
In the case where the conditional is false, based on Clojure/JVM behavior, the :test meta shouldn't be set, which would imply that when tests are run, the test wouldn't get executed.
additional context
This is very tangentially related to #602 - I'm working on adding the lib tests from the original repo, with a macro to fill in some of the midje functionality - that test code uses some conditional fact calls, so I'm transforming them into deftest calls, which led to this finding.
I haven't done a ton of cause analysis on this yet; just noting the symptom here.
The text was updated successfully, but these errors were encountered:
At a closer look, only :ns and :name seem to be present in a conditionally defined var in JVM Clojure.
Removing the name metadata worked, but removing :file caused some failing tests in bb. I guess we could just remove the name metadata as a fix for this issue.
version
1.0.164
platform
Windows (also repro'ed on linux bb in WSL)
problem
If a
deftest
exists inside a conditional (e.g. awhen
), and the condition is false, the:test
meta appears to get created as a list instead of a function (as though it were quoted), and the test still tries to execute when the ns is testedrepro
expected behavior
In the case where the conditional is false, based on Clojure/JVM behavior, the
:test
meta shouldn't be set, which would imply that when tests are run, the test wouldn't get executed.additional context
This is very tangentially related to #602 - I'm working on adding the lib tests from the original repo, with a macro to fill in some of the midje functionality - that test code uses some conditional
fact
calls, so I'm transforming them intodeftest
calls, which led to this finding.I haven't done a ton of cause analysis on this yet; just noting the symptom here.
The text was updated successfully, but these errors were encountered: