Scoping is too confusing with custom package and modules to use `pmap`

You should not be using push!(LOAD_PATH, ".") but instead have your package deved in the environment you set the REPL before doing the include.

In fact, if you are running test/runtests.jl you probably should be doing:

cd MyPackage.jl
julia
> import Pkg
> Pkg.activate(".")
> Pkg.instantiate(".") # Only necessary if you changed dependencies since last call.
> Pkg.test()

If you want to use include directly in the REPL, it may be necessary to replace @everywhere push!(LOAD_PATH, ".") by

@everywhere import Pkg
@everywhere Pkg.activate(".")

inside your test script, and this be executed from a folder that has a Manifest.toml where you deved you package.

1 Like