Hi Nikola

Have you tried?
`setup(context), do: Module.function_name(context)`

Cheers.

On Sun, 5 Feb 2023 03:21:12 -0800 (PST)
Nikola Begedin <begedinnik...@gmail.com> wrote:

> Hello everyone. 1st time writing here. I scanned through the repo
> docs, etc, and I'm not finding a guideline on how to do it. Apologies
> if I'm making a mistake here.
> 
> I have a proposal, or at least a question about a potential proposal.
> 
> You can always import a function from a module and then use `setup 
> :function_name` in a test module. This allows you to reuse setup
> functions across the codebase.
> 
> However, at least in the environment I work in, I have a fair amount
> of colleagues who dislike importing things.
> 
> So my question is, would a version of setup that allows specifying a
> setup callback via a [module, function], {module, function}, etc, be
> a worthy addition?
> 
> Including the arity would be more conventional, of course, but it's a
> bit redundant here.
> 
> At quick glance, it does seem feasible, but it changes the API and I
> might be missing other caveats, so I'm not sure.
> 

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/63df9755.050a0220.aefc6.fd42SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Reply via email to