• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    Julia
  • License
    Other
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Activate your test enviroment, so you can use your test dependencies in the REPL

TestEnv

Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

This is a 1-function package: TestEnv.activate. It lets you activate the test enviroment from a given package. Just like Pkg.activate lets you activate it's main enviroment.

Consider for example ChainRules.jl has as a test-only dependency of ChainRulesTestUtils.jl, not a main dependency

pkg> activate ~/.julia/dev/ChainRules

julia> using TestEnv;

julia> TestEnv.activate();

julia> using ChainRulesTestUtils

Use Pkg.activate to re-activate the previous environment, e.g. Pkg.activate("~/.julia/dev/ChainRules").

You can also pass in the name of a package, to activate that package and it's test dependencies: TestEnv.activate("Javis") for example would activate Javis.jl's test environment.

Finally you can pass in a function to run in this environment.

using TestEnv, ReTest
TestEnv.activate("Example") do
    retest()
end

See also: