如何摆脱重复clojure测试是单位测试REPL [英] how do i get rid of duplicate clojure test-is unit tests on the REPL
本文介绍了如何摆脱重复clojure测试是单位测试REPL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个小脚本
(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)
我用来快速重新加载所有的东西,并关闭单元测试。
麻烦的是每次(deftest ...)评估文件读取一个附加
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!
推荐答案
有一个一个标志 * load-tests *
,它决定 deftest
的行为。 (doc deftest)
似乎暗示将此标志设置为 false
可以解决您的问题。
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.
这篇关于如何摆脱重复clojure测试是单位测试REPL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文