-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Parts of test body can be evaluated multiple times after deftest
is reevaluated
#2233
Comments
This is a bug in cider-nrepl test extenions =-body. Your examples can be made to pass by wrapping the is body inside a
Minimal reproductionlein repl:
cider repl:
I'll submit a PR to cider-nrepl later on and link this issue |
Ah, that makes sense. And thanks for putting up a PR to fix it! |
(is (= ...)) tests executed in cider currently fail if the first argument to = is not pure as it is evaluated multiple times inside `=-body`. By caching the value, this can be prevented. This fixes clojure-emacs/cider/issues/2233
(is (= ...)) tests executed in cider currently fail if the first argument to = is not pure as it is evaluated multiple times inside `=-body`. By caching the value, this can be prevented. This fixes clojure-emacs/cider/issues/2233
Expected behavior
No part of test body is evaluated multiple times after
deftest
is re-evaluated.Actual behavior
Parts of test body can be evaluated multiple times after
deftest
is re-evaluated.Steps to reproduce the problem
Given the following:
Running
foo-test
passes:Re-evaluating
foo-test
, however, either via the CIDER REPL orcider-eval-defun-at-point
, causes the first arg tois
to be evaluated multiple times and the test to fail:This does not happen w/
lein repl
.Note: I came across this while investigating #1936. I suspect resolving this will go some way towards resolving that.
Environment & Version information
CIDER version information
Lein/Boot version
Leiningen 2.8.1
Emacs version
GNU Emacs 26.0.91
Operating system
Darwin C02RW05YFVH6 15.6.0
The text was updated successfully, but these errors were encountered: