Packaging: why can't Julia find Test in Travis?

I believe the issue you’re seeing is because Project.toml doesn’t include the dependency on Test (or Pkg). Here’s a way to fix that:

  • julia> ] add Test

Project.toml will now have:

[deps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

If you only need Test when you run your tests (i.e. you don’t have using Test or import Test anywhere in /src/), you can edit this slightly to:

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

I think I remember reading that there will be a way to do this in a single step at some point in the future, but in any case, committing that change to git should fix the tests on travis.

(I opened a PR to make certain this would work, but you might like to make the change yourself :slight_smile: )

2 Likes