问题
I have a little script
(use
:reload-all
'com.example.package1
'com.example.package2
'com.example.package3
'com.example.testlib)
(run-tests
'com.example.package1
'com.example.package2
'com.example.package3)
that I use to quickly reload everything and fire off the unit tests.
trouble is that each time (deftest ... ) is evaluated as the files are read an additional test is created so after working hard all day each test is now being run 103 times, eek!
回答1:
There is a flag *load-tests*
which determines the behaviour of deftest
. (doc deftest)
seems to implicate that setting this flag to false
could solve your problem.
来源:https://stackoverflow.com/questions/1157411/how-do-i-get-rid-of-duplicate-clojure-test-is-unit-tests-on-the-repl