-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add ExUnit.run/1 to rerun test modules #11788
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
Conversation
- Register `:ex_unit_async` module attributes as persisted attributes to allow us to the info through `Module.__info__(:attributes)` callback. - This in turn allow us to add provided modules as sync/async conditionally.
Returns a map containing the total number of tests, the number | ||
of failures, the number of excluded tests and the number of skipped tests. | ||
""" | ||
@spec run() :: suite_result() | ||
def run do | ||
@spec run(list(atom)) :: suite_result() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the spec change, do we need to add the since
attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question but I don't think so! We can mention this difference in the docs. :)
💚 💙 💜 💛 ❤️ |
This PR add
ExUnit.rerun/1
to rerun tests given a list of test modules.Context
Often times, when writing a tutorial in Livebook, I want to write a test case for
the users so they could interactively write some code to make it pass. This is especially
helpful when we use Livebook as a teaching medium.
Currently, there are no ways to support ruruning a test without rewriting it.
Proposed solution
Add
ExUnit.rerun/1
to take in a list of test modules to be rerun:For more, refer to the proposal in the mailing list