-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase test coverage for :fail-fast
?
#85
base: master
Are you sure you want to change the base?
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a throwing-test
when it doesn't throw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional whitespace.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap at 80 characters, remove markdown backtick, remove "may".
Thanks for the review! It's ready again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: