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

clojure-test: ::shrunk report type is not very portable #66

Open
frenchy64 opened this issue Apr 12, 2021 · 2 comments
Open

clojure-test: ::shrunk report type is not very portable #66

frenchy64 opened this issue Apr 12, 2021 · 2 comments

Comments

@frenchy64
Copy link
Contributor

It turns out clojure.test/report is very flexible, being both a dynamic var and a multimethod. I think introducing a custom reporting event via :type ::shrunk is pretty much impossible to be compatible with this dynamism.

For example, eftest has 3 different multimethods, all with different output formats: ANSI colors, xml, and progress bar. It dynamically rebinds clojure.test/report based on configuration parameters.

What this means is the ::shrunk printing disappears when the reporting mechanism is rebound. And since test.chuck can't predict what the current output format is, it seems wiser to piggieback the smallest+seed reporting on existing reporting types like :fail or :pass.

@frenchy64 frenchy64 changed the title clojure-test: ::shrunk reporting event is not very portable clojure-test: ::shrunk report type is not very portable Apr 12, 2021
@gfredericks
Copy link
Owner

If there's a refactoring that roughly preserves the current vanilla user experience, I'd be open to it.

@frenchy64
Copy link
Contributor Author

Hmm, one way to achieve that might be if (thread-bound? #'ct/report), then propagate the reporting to individual test reports, otherwise keep the current format. I think the logic could be held in c.g.t.chuck.clojure-test/-report.

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