Clojure.test和Leinigen:如何从命令行运行单个测试

时间:2017-01-05 12:09:15

标签: clojure leiningen clojure.test

这样:

Run one Clojure test (not all tests in a namespace), with fixtures, from the REPL

使用repl工作正常,如何使用Leinigen从命令行执行此操作?

1 个答案:

答案 0 :(得分:28)

您正在寻找的可能是:

lein test :only my.namespace/my-test

请注意:

lein help test

输出:

"A default :only test-selector is available to run select tests. For example,
`lein test :only leiningen.test.test/test-default-selector` only runs the
specified test. A default :all test-selector is available to run all tests."