A pull request will be very welcome indeed!

On Thu, Apr 14, 2022 at 2:19 AM [email protected] <[email protected]>
wrote:

> Hi all,
>
> I would like to propose `ExUnit.rerun(list_of_modules)` to rerun test
> modules.
>
> *Use Case*
> As far as I could think off, it is only useful in the context of Livebook
> notebook.
>
> 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. I have tried using Livebook branch out section but have no luck as well.
>
>
> *Current Hack*Currently, one can still achieve that by using
> Module.create/3 with ExUnit.run/1. Here's a Livebook notebook
> <https://github.com/kw7oe/livebook-notebooks/blob/main/ex_unit_rerun_demo.livemd>
> to demonstrate it, or you can run it here
> <https://livebook.dev/run?url=https%3A%2F%2Fgithub.com%2Fkw7oe%2Flivebook-notebooks%2Fblob%2Fmain%2Fex_unit_rerun_demo.livemd>
> .
>
> This work since we are essentially defining a "new" module.
>
>
> *Minimal working changes*Here's a gist
> <https://gist.github.com/kw7oe/78c37db22c89d7eabb7f80c91b94dfba> that I
> quickly hack on to implement it. It's not perfect but seems to be working.
>
> *The Livebook twitter account suggested sending a PR here
> <https://twitter.com/livebookdev/status/1514310933673304065>, but I guess
> let me propose it here first.*
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/2e69207c-15e6-4bdf-8461-dad727746d31n%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/2e69207c-15e6-4bdf-8461-dad727746d31n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LYHh87i2jSLbr3SAK_k0hqOdPbeSNtavrzD9YnRBvR8g%40mail.gmail.com.

Reply via email to