Skip to content

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

License

Notifications You must be signed in to change notification settings

maxkapur/TestEnv.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%