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

Composed tests are not supported #1

Open
haines opened this issue Feb 8, 2017 · 0 comments
Open

Composed tests are not supported #1

haines opened this issue Feb 8, 2017 · 0 comments

Comments

@haines
Copy link
Contributor

haines commented Feb 8, 2017

Tests may be composed, for example

(deftest addition
  (is (= 4 (+ 2 2)))
  (is (= 7 (+ 3 4))))

(deftest subtraction
  (is (= 1 (- 4 3)))
  (is (= 3 (- 7 4))))

(deftest arithmetic
  (addition)
  (subtraction))

(defn test-ns-hook []
  (arithmetic))

This means that :begin-test-var messages can be nested:

{:type :begin-test-var, :var #'example.test/arithmetic}
{:type :begin-test-var, :var #'example.test/addition}
...
{:type :end-test-var, :var #'example.test/addition}
{:type :begin-test-var, :var #'example.test/subtraction}
...
{:type :end-test-var, :var #'example.test/subtraction}
{:type :end-test-var, :var #'example.test/arithmetic}

This is not supported by test-report.summary/summarize (which assumes that only results appear between :begin- and :end-test-var), and therefore not handled well in the JUnit XML output.

It doesn't appear to be particularly widely used so is probably not a high priority to fix.

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

1 participant