[英]Clojure Leiningen test FAILs not shown in error summary
When running lein test
on my current Clojure project, I got two test failures but the summary stated that I got 0 failures.在我当前的 Clojure 项目上运行
lein test
时,我得到了两次测试失败,但总结说我得到了 0 次失败。 See output snippet below:请参阅下面的输出片段:
$ lein test
FAIL in clojure.lang.PersistentList$EmptyList@1 (config.clj:53)
expected: (= (some-fn some-input) (expected-output))
actual: (not (= (actual-output) (expected-output)))
FAIL in clojure.lang.PersistentList$EmptyList@1 (config.clj:53)
expected: (= (some-fn some-other-input) (other-expected-output))
actual: (not (= (other-actual-output) (other-expected-output)))
lein test project.test.config
lein test project.test.other-module
lein test project test.another-module
lein test project test.one-more
Ran 8 tests containing 71 assertions.
0 failures, 0 errors.
Note the FAIL
lines and the last line.请注意
FAIL
行和最后一行。 Previously tests have worked in this project, but I am unable to isolate what code changes might have affected this incorrect behavior from lein test
.以前在这个项目中进行了测试,但我无法从
lein test
分离出哪些代码更改可能影响了这种不正确的行为。
Has anyone seen this before and know what might cause it to occur?有没有人以前见过这种情况并知道可能导致它发生的原因?
I discovered the problem shortly after posting this but am leaving the question here for others.我在发布这篇文章后不久就发现了这个问题,但我把这个问题留给了其他人。 I accidentally put my test within a
def
instead of a deftest
.我不小心把我的测试放在
def
而不是deftest
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.