Increase test coverage for :fail-fast?#85
Conversation
|
Commit messages of this repository should follow the seven rules of a great Git commit message, as mentioned in the project's contributing guidelines. It looks like there's a few issues with the commit messages in this pull request:
|
|
(Fat-fingered the close button) |
weavejester
left a comment
There was a problem hiding this comment.
Thanks for the patch! Some changes required as part of the review.
eftest/test/eftest/runner_test.clj
Outdated
| (def proof-init-state []) | ||
| (def proof | ||
| "Helps proving that a given deftest was run (and in a specific order, relative to other deftests)." | ||
| (atom proof-init-state)) |
There was a problem hiding this comment.
This could be changed to:
(def tests-completed (atom []))The tests-completed name describes what it holds, and the fact it's a vector indicates it's ordered.
eftest/test/eftest/runner_test.clj
Outdated
| (clojure.core/refer-clojure) | ||
| (clojure.core/require 'clojure.test) | ||
| (clojure.test/use-fixtures :once (fn [t] | ||
| (swap! eftest.runner-test/proof conj :throwing-test-in-fixtures.side-effect) |
There was a problem hiding this comment.
Line length should be 80 characters at most.
eftest/test/eftest/runner_test.clj
Outdated
| (clojure.test/deftest throwing-test | ||
| (clojure.test/is (= 1 1))) |
There was a problem hiding this comment.
Why is this a throwing-test when it doesn't throw?
There was a problem hiding this comment.
Why is this a throwing-test when it doesn't throw?
It 'throws' via the fixture but either way, I renamed it
eftest/test/eftest/runner_test.clj
Outdated
| (is (= {:test 2 :fail 2 :error 0} result)) | ||
| (is (= [:single-failing-test.side-effect :another-failing-test.side-effect] | ||
| @proof)))) | ||
|
|
eftest/test/eftest/runner_test.clj
Outdated
| ;; Example test namespaces may have a prefix such as `ns-0` | ||
| ;; so that they can be deterministically sorted. |
There was a problem hiding this comment.
Wrap at 80 characters, remove markdown backtick, remove "may".
|
Thanks for the review! It's ready again. |
weavejester
left a comment
There was a problem hiding this comment.
Thanks for the changes. There's a couple more, but overall this is looking fine.
eftest/test/eftest/runner_test.clj
Outdated
| (def proof | ||
| "Helps proving that a given deftest was run (and in a specific order, relative to other deftests)." | ||
| (atom proof-init-state)) | ||
| (def tests-completed-init-state []) |
There was a problem hiding this comment.
This can be removed. Just use (atom []). By using reset or atom, you know whatever's there is the initial state. Using a var makes it less readable because you have to look up what the initial state actually is.
eftest/test/eftest/runner_test.clj
Outdated
| (clojure.core/refer-clojure) | ||
| (clojure.core/require 'clojure.test) | ||
| (clojure.test/deftest throwing-test | ||
| (swap! eftest.runner-test/tests-completed conj :throwing-test.side-effect) |
There was a problem hiding this comment.
The .side-effect can be removed from the keywords. It doesn't add any more necessary information.
eftest/test/eftest/runner_test.clj
Outdated
| (swap! eftest.runner-test/tests-completed | ||
| conj | ||
| :throwing-test-in-fixtures.side-effect) |
There was a problem hiding this comment.
Perhaps:
(swap! eftest.runner-test/tests-completed conj
:throwing-test-in-fixtures)|
Ready again! |
|
(ping) |
|
Sorry for the delay. It looks fine - can you squash down your commits? |
22fb442 to
7cb3632
Compare
|
Commit messages of this repository should follow the seven rules of a great Git commit message, as mentioned in the project's contributing guidelines. It looks like there's a few issues with the commit messages in this pull request:
|
This will help reliably coming up with a fix for weavejester#75. Coverage is extended by: * providing counterexamples for each test case * also exercising exception handling, whether it happens in the deftest body, or in fixtures.
7cb3632 to
9f31168
Compare
|
Commit messages of this repository should follow the seven rules of a great Git commit message, as mentioned in the project's contributing guidelines. It looks like there's a few issues with the commit messages in this pull request:
|
Satisfied
Left as-is see #85 (comment) |
I'd prefer plaintext, please. Not all git log viewers support markdown. So a better commit message might be: You also mention #75 in the commit message, but these tests pass, don't they? How do you see them helping with that issue? |

This will help reliably coming up with a fix for #75.
Coverage is extended by: