When testing my package I get errors that are not present when I run the failing test script in a new REPL, suggesting that namespace corruption is the problem. My runtests.jl setup is probably to blame; it looks like
files= ["test1.jl", "test2.jl"]
for file in files:
How should I better structure runtests.jl to avoid this issue?
I am not sure about this, unless you use
files in some scope that is interfering.
In any case, there is
I usually wrap everything inside individual files in a module. Usually it have a name of a file plus word Test. You can factor out common pieces and include them into individual files. So, it looks like that
It’s more or less the same as
SafeTestsets.jl just more explicit.