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

Feature: let ?before and ?before_user arguments from test_function... returns a Learnocaml_report.t type (as ?after) #495

Open
asere opened this issue Sep 12, 2022 · 0 comments
Labels
kind: feature New user-facing feature.

Comments

@asere
Copy link
Contributor

asere commented Sep 12, 2022

Related issue(s) or PR(s):
I don't know, maybe none ?

Related project scope(s):
Grading test functions with ?before : 'a -> ... -> unit or ?before_user: 'a -> ... -> unit as optionnal argument

Related user(s):
I don't know, maybe only me ?

The problem

Hello,
Actually, the main utility of preprocessing functions ?before or ?before_user used as argument of test_function... is to introduce references or side-effects. But I'm wondering if theses functions can also print some messages/sections before the test report, and I'm actually not able to find another way to do that.
I've tried to wrap ?test argument, but a message "Computing..." is created before the test.

Wanted solution

I want arguments like ?before: 'a -> ... -> Learnocaml_report.t or ?before_user: 'a -> ... -> Learnocaml_report.t for test_function like functions.

Considered alternatives

At the moment, I have to use after function, then add some fixs by adding a header and removing the last line.

Additional context

My actual use of this feature is to add some breaklines between tests, by just creating before functions fun _ -> breakline, while breakline: Learnocaml_report.t is use a Message (Break, Informative) report for instance.

@asere asere added the kind: feature New user-facing feature. label Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New user-facing feature.
Projects
None yet
Development

No branches or pull requests

1 participant