相关疑难解决方法(0)

从Clojure Repl和Leiningen运行测试

作为clojure的新手,我使用leiningen创建了一个示例项目

lein new app first-project
Run Code Online (Sandbox Code Playgroud)

这给了我这个目录

.
??? doc
?   ??? intro.md
??? LICENSE
??? project.clj
??? README.md
??? resources
??? src
?   ??? first_project
?       ??? core.clj
??? target
?   ??? repl
?       ??? classes
?       ??? stale
?           ??? extract-native.dependencies
??? test
    ??? first_project
        ??? core_test.clj
Run Code Online (Sandbox Code Playgroud)

在不修改任何文件的情况下,我可以成功地完成唯一的失败测试

lein test
...
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Tests failed.
Run Code Online (Sandbox Code Playgroud)

但是我无法使用运行测试从REPL做同样的事情

lein repl
first-project.core=> (use 'clojure.test)
nil
first-project.core=> (run-tests)

Testing first-project.core

Ran 0 tests containing 0 …
Run Code Online (Sandbox Code Playgroud)

clojure leiningen

34
推荐指数
2
解决办法
1万
查看次数

22
推荐指数
1
解决办法
5849
查看次数

标签 统计

clojure ×2

leiningen ×2

clojure.test ×1