Skip to content

Conversation

@lbradstreet
Copy link

I have had trouble with for-all for a while now, because it doesn't report back the failing assertions:

The point of this PR is to report back which assertions fail. Please let me know if you disagree with implementation and I'll fix it.

Previous behaviour:

{:result false, :seed 1468079929561, :failing-size 0, :num-tests 1, :fail [{n-jobs 1, job-ids [#uuid "4cda91f4-f7db-48ca-a246-852480444eef"], gen-cmds []}], :shrunk {:total-nodes-visited 0, :depth 0, :result false, :smallest [{n-jobs 1, job-ids [#uuid "4cda91f4-f7db-48ca-a246-852480444eef"], gen-cmds []}]}, :test-var "deterministic-abs-test"}
FAIL in (deterministic-abs-test) (clojure_test.cljc:21)
expected: result
  actual: false

New behaviour:

FAIL in (deterministic-abs-test) (deterministic_peer_test.clj:268)
not enough peers
expected: (>= n-peers 4)
  actual: (not (>= 0 4))
{:result false, :seed 1468079929561, :failing-size 0, :num-tests 1, :fail [{n-jobs 1, job-ids [#uuid "4cda91f4-f7db-48ca-a246-852480444eef"], gen-cmds []}], :shrunk {:total-nodes-visited 0, :depth 0, :result false, :smallest [{n-jobs 1, job-ids [#uuid "4cda91f4-f7db-48ca-a246-852480444eef"], gen-cmds []}]}, :test-var "deterministic-abs-test"}

FAIL in (deterministic-abs-test) (clojure_test.cljc:21)
expected: result
  actual: false

test.chuck.clojure-test/for-all discards the reports and returns and
overall report which is missing the assertion information that failed.

for-all now calls report on each report so that the assertion failures
are reported back to the user
@lbradstreet
Copy link
Author

Looks like a test is broken (intentionally), but I haven't figured out to reverse it so it's a success yet.

@lbradstreet
Copy link
Author

I've hacked around the issue by resetting the report and ensuring the original report failed (since this is the intended result). Unfortunately I haven't figured out how to get rid of the following output (which is expected). Let me know if these changes aren't sufficient.

FAIL in (for-all-test) (clojure_test_test.cljc:30)
expected: (zero? x)
  actual: (not (zero? 1))

@lbradstreet lbradstreet force-pushed the report-for-all-failures branch from 0b9bc94 to 7cc7c03 Compare July 10, 2016 10:01
@gfredericks
Copy link
Owner

Does this repeatedly print failures while shrinking? Was that the intention?

@lbradstreet
Copy link
Author

Hmm, yes, it does report them while shrinking. Looks like they needs to be be fixed.

On 12 Jul 2016, at 7:36 AM, Gary Fredericks notifications@github.com wrote:

Does this repeatedly print failures while shrinking? Was that the intention?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants