Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testify not installed with go test -i #20

Closed
mlafeldt opened this issue Aug 26, 2013 · 4 comments
Closed

Testify not installed with go test -i #20

mlafeldt opened this issue Aug 26, 2013 · 4 comments

Comments

@mlafeldt
Copy link

Unfortunately, testify doesn't get installed as a test dependency when running go test -i ./.... Instead, I have to manually run go get github.com/stretchr/testify before I can use it for any project.

This somewhat subverts the idea of (test) dependencies that are automatically installed, no?

@tylerstillwater
Copy link
Contributor

go test -i doesn't download dependencies for any tests. You should only have to run go get once for any dependency. At that point, it will be downloaded to your $GOPATH/src directory and available to any package from that point forward.

@mlafeldt
Copy link
Author

If that's the case, what does this mean:

$ go help test
...
    -i
        Install packages that are dependencies of the test.
        Do not run the test.

@tylerstillwater
Copy link
Contributor

It means the packages are compiled and installed to $GOPATH/pkg. This prevents them from being compiled each time the test runs, thus speeding up your testing.

@mlafeldt
Copy link
Author

So I didn't understand the command in the first place. Thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants