About the use of the test suite when developing a package

I think this is because LinearAlgebra is part of the standard library.

In your specific case, add LinearAlgebra to your test environment:

] activate test
add LinearAlgebra

Since you have a Project.toml for the test environment, I did not find a better workflow than doing the following: after loading Revise.jl, start Julia in the MyPkg base directory:

] activate .
using MyPkg
] activate test
include("test/runtests.jl")

EDIT: as @goerz points out, there is a better way of doing this.

(Almost) Any change you make to MyPkg will be tracked by Revise.jl so you can develop your tests and the package at the same time. Remember to comment out using MyPkg in runtests.jl; you should re-enable it before running the test suite with

] test
2 Likes