Julia Can't Test User Packages

Viewed 883

I have a Julia package I developed locally, let's call it mypack, and I can't automatically test it with Julia in pkg mode. Running pkg>test mypack gives me the following error:

(v1.3) pkg> test mypack
  Updating registry at `~/.julia/environments/v1.3/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Testing mypack
 Resolving package versions...
[ Info: No changes
    Status `/tmp/jl_m6URie/Manifest.toml`
  [4e168b6d] mypack v0.1.0 [`~/Documents/mypack`]
ERROR: LoadError: ArgumentError: Package Test not found in current path:
- Run `import Pkg; Pkg.add("Test")` to install the Test package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:887
 [2] include at ./boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1105
 [4] include(::Module, ::String) at ./Base.jl:31
 [5] include(::String) at ./client.jl:424
 [6] top-level scope at none:6
in expression starting at /home/myname/Documents/mypack/test/runtests.jl:1
ERROR: Package mypack errored during testing

My mypack project has the expected structure where there's a root directory with a Project.toml and Manifest.toml generated using ]generate mypack. /test/runtests.jl is just the line

using Test

This works on two machines that I've tested it on, one of which was using Julia 1.1 and one which was using Julia 1.2. The errors are happening on a new install of Julia 1.3.

I am able to test other packages (such as Statistics just fine, which I did to make sure Test was working). I have a more complicated project which brought this to my attention, but this mypack MWE is also broken.

1 Answers
Related