wookay / Jive.jl

some useful steps in tests 👣
Other
42 stars 6 forks source link

making test dependencies available #17

Open guyvdbroeck opened 4 years ago

guyvdbroeck commented 4 years ago

In order to make Jive and other dependencies available when running tests as a script, I added this to the header of runtests.jl:

using Distributed
@everywhere using Pkg

if abspath(PROGRAM_FILE) == @__FILE__
    # when run as a script, activate the test environment of this package so that test dependencies are available
    @everywhere Pkg.activate(dirname(@__FILE__));
end

using Jive
...

Otherwise the user needs to copy all the dependencies from the package and manually install them in the main environment.

Perhaps this can be part of the documentation of how to use Jive as part of a package definition with dependencies listed there.

wookay commented 4 years ago

thanks for the issue. fixed and released Jive v0.2.3, and here are examples.