Skip to content
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

Failing tests #7

Closed
nenadalm opened this issue Feb 18, 2016 · 2 comments
Closed

Failing tests #7

nenadalm opened this issue Feb 18, 2016 · 2 comments

Comments

@nenadalm
Copy link
Contributor

$ git clone https://github.com/pjstadig/humane-test-output
$ cd humane-test-output/
$ lein test
Retrieving org/clojure/clojure/1.3.0/clojure-1.3.0.jar from central

lein test pjstadig.humane-test-output.formatting-test

lein test :only pjstadig.humane-test-output.formatting-test/t-formatting

FAIL in (t-formatting) (formatting_test.clj:6)
FIXME, I fail.
expected: {:another-key "and another value",
           :foo :bar,
           :something "a long string?",
           :baz :quux}
  actual: {:fo :bar}
    diff: - {:baz :quux,
             :something "a long string?",
             :foo :bar,
             :another-key "and another value"}
          + {:fo :bar}

lein test :only pjstadig.humane-test-output.formatting-test/t-formatting

FAIL in (t-formatting) (formatting_test.clj:9)
FIXME, I fail.
expected: {:another-key "and another value",
           :foo :bar,
           :something "a long string?",
           :baz :quux}
  actual: {:foo :bar}
    diff: - {:baz :quux,
             :something "a long string?",
             :another-key "and another value"}

lein test :only pjstadig.humane-test-output.formatting-test/t-formatting

FAIL in (t-formatting) (formatting_test.clj:12)
FIXME, I fail.
expected: {:foo :bar}
  actual: {:another-key "and another value",
           :foo :bar,
           :something "a long string?",
           :baz :quux}
    diff: + {:baz :quux,
             :something "a long string?",
             :another-key "and another value"}

lein test :only pjstadig.humane-test-output.formatting-test/t-formatting

FAIL in (t-formatting) (formatting_test.clj:15)
FIXME, I fail.
expected: {:foo :bar, :baz :quux}
  actual: {:foo :bar, :baz :quux}
    diff: + expected: {:foo :bar, :baz :quux}
  actual: {:fo :bar, :baz :quux}
    diff: - {:foo :bar}
          + {:fo :bar}
expected: {:foo :bar, :baz :quux}
  actual: {:fo :bar, :baz :quux}
    diff: - {:foo :bar}
          + {:fo :bar}

lein test :only pjstadig.humane-test-output.formatting-test/t-formatting

FAIL in (t-formatting) (formatting_test.clj:19)
FIXME, I fail.
expected: (list? foo)
  actual: (not
           (list?
            {:another-key "and another value",
             :foo :bar,
             :something "a long string?",
             :baz :quux}))

lein test :only pjstadig.humane-test-output.formatting-test/t-macro-wrapping

FAIL in (t-macro-wrapping) (formatting_test.clj:26)
expected: 1
  actual: 2
    diff: - 1
          + 2

lein test pjstadig.humane-test-output.records-test

lein test :only pjstadig.humane-test-output.records-test/t-records

FAIL in (t-records) (records_test.clj:9)
these should not print as plain maps
expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
  actual: #pjstadig.humane_test_output.records_test.ARecord{:foo :bar}
    diff: - {:foo :foo}
          + {:foo :bar}

lein test :only pjstadig.humane-test-output.records-test/t-records

FAIL in (t-records) (records_test.clj:11)
there should be a diff here
expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
  actual: {:foo :foo}

lein test :only pjstadig.humane-test-output.records-test/t-records

FAIL in (t-records) (records_test.clj:13)
and here
expected: #pjstadig.humane_test_output.records_test.ARecord{:foo :foo}
  actual: #pjstadig.humane_test_output.records_test.BRecord{:foo :foo}

Ran 3 tests containing 9 assertions.
9 failures, 0 errors.
Tests failed.
$ lein -v
Leiningen 2.5.3 on Java 1.8.0_71 OpenJDK 64-Bit Server VM
@pjstadig
Copy link
Owner

The tests are intended to fail. This library is for improving the output of tests. I didn't want to have to write tests that run tests and capture their output to make assertions about it. So I opted for tests that fail so that they can be visually inspected.

I'd be happy to entertain a PR for some smarter tests, but for now I made it more explicit.

@nenadalm
Copy link
Contributor Author

ok - I just that I'd like to try to make it work also for clojurescript so I started with running tests :)

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

No branches or pull requests

2 participants