Fork me on GitHub
#testing
<
2018-12-19
>
avi21:12:48

👋 Hi all, I’ve forked eftest to attempt to add a feature, but I’m having trouble getting eftest’s tests to pass. And I mean, on current master. I don’t see any guidance in the README on running eftest’s tests, so given that I’m pretty rusty with Leiningen I wonder whether I’m missing something… is it generally sufficent to just clone a repo, cd to wherever a project.clj file is, and then run lein test ?

avi21:12:59

The specific Leiningen project I’m testing is here: https://github.com/weavejester/eftest/tree/master/eftest

seancorfield22:12:49

@aviflax This failure

FAIL in (file-and-line-in-pretty-fail-report) (report_test.clj:42)
expected: (= (str "\nFAIL in eftest.report-test/file-and-line-in-pretty-fail-report" " (report_test.clj:999)\n" "foo\n" "expected: " pretty-nil "\n  actual: " pretty-nil "\n") result)
  actual: (not (= "\nFAIL in eftest.report-test/file-and-line-in-pretty-fail-report (report_test.clj:999)\nfoo\nexpected: nil\n  actual: nil\n" "\nFAIL in  (report_test.clj:999)\nfoo\nexpected: nil\n  actual: nil\n"))

seancorfield22:12:05

(the other two seem to be "expected" failures, based on the test names)

avi22:12:21

Yup that one

seancorfield22:12:36

Looks like it's failing to bind report/*testing-path*

seancorfield22:12:56

I added that to the binding call in that test and it passes.

seancorfield22:12:01

Specifically, I added

(def my-ns *ns*)
just above that test (to capture the compilation namespace) and
report/*testing-path* [my-ns #'file-and-line-in-pretty-fail-report]
into the binding call.

avi22:12:34

Excellent, thanks! I’ll open a PR with that fix.