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

FR: change print-invocations plugin to put all invocations on one line #434

Open
NoahTheDuke opened this issue May 2, 2024 · 5 comments

Comments

@NoahTheDuke
Copy link
Contributor

Currently, when you have multiple failures, the :kaocha.plugin/print-invocations plugin will print each failed test on its own line:

bin/kaocha --focus 'kaocha.history-test/example-one-test'
bin/kaocha --focus 'kaocha.history-test/example-two-test'
bin/kaocha --focus 'kaocha.history-test/example-three-test'

This is because the plugin is implemented with a doseq:

(doseq [test (testable/test-seq results)]

Given how long it can take to start up a Clojure program, I'd like it for all of the invocations to be bundled into a single call:

bin/kaocha --focus 'kaocha.history-test/example-one-test' --focus 'kaocha.history-test/example-two-test' --focus 'kaocha.history-test/example-three-test'

If this is acceptable, I can open a PR.

@plexus
Copy link
Member

plexus commented May 7, 2024

I can see arguments for both behaviors, the idea with the current implementation is that you would tackle these one by one, hence the separate invocations.

Edit: Let's see if we can get some second opinions on this, or folks can vote with 👍 / 👎 .

@imrekoszo
Copy link
Contributor

Would it hurt to output both?

@plexus
Copy link
Member

plexus commented May 7, 2024

It's already quite noisy as it is...

@NoahTheDuke
Copy link
Contributor Author

This could be a configuration. Default to current behavior, add :kaocha.plugin.print/format :one-line or something. It complicates the implementation a smidge, but I can fix that.

@imrekoszo
Copy link
Contributor

I like the config idea. The two print styles are both useful but for different purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants