Warm tip: This article is reproduced from serverfault.com, please click

Julia

发布于 2020-11-28 17:54:35

I'm developing Julia code for a package, and in my code, the user is free to choose the optimizer he wants, hence, my code does not depend on the many optimizers available. Yet, when I implemented a test set, and to check if the functions are indeed working I need to import an optimizer. My question is then, how to use an specific dependence only on the test? Without making it a dependency on the package itself?

Questioner
Davi Barreira
Viewed
0
logankilpatrick 2020-11-29 02:41:41

You can find out more about adding a project.toml and manifest.toml specifically for your test/ folder here: https://julialang.github.io/Pkg.jl/v1/creating-packages/#Test-specific-dependencies-in-Julia-1.2-and-above