On Sun, 2023-04-02 at 11:02 -0700, Kamil Ziemian wrote:
> Hello,
>
gonum.org/v1/gonum has no tests, the packages under that directory do,
so to test the entire suite, do `go test
gonum.org/v1/gonum/...` (note
the elipsis in the path).
It looks to me like you are running into problems with understanding
how modules work (this is a Go-wide thing, see
https://go.dev/ref/mod)
The error you are seeing is coming from here
https://github.com/gonum/plot/blob/c76e89136f1c72e340b8d6c46d229a6e0ab1092b/axis_test.go#L167
due to a filesystem permission. Given what you've written, I suspect
that you are attempting to work in the mod/ directories which are read-
only. I've just replicated this and it seems like a sharp edge on how
modules interact with testing that writes to the filesystem.
In order to be able to run tests, clone the repos that you want to run
tests with to wherever you are keeping your Go source code (for sanity
I would recommend this be at $(go env GOPATH)/src/, so you'd find Gonum
plot at $(go env GOPATH)/src/
gonum.org/v1/plot. Then when you run tests
you are in a rw file system. Run the tests from within cloned module.
> Can I ask you for a little help? I feel lost in what is going on with
> these packages.
Can I ask what level of experience you have with Go? It feels like you
are bumping up against aspects of the language rather than aspects of
Gonum. If this is the case, I'd strongly recommend you try the Go Tour,
https://go.dev/tour/
Dan