[go-nuts] Re: Unit tests - same vs separate package

2018-01-31 Thread Alex Buchanan
FWIW, I did not know about this line: "Test files that declare a package with the suffix "_test" will be compiled as a separate package, and then linked and run with the main test binary." In order to write integration/e2e tests while avoiding import cycles, most (not all) of our tests live in

[go-nuts] Re: Unit tests - same vs separate package

2018-01-31 Thread Sonia Keys
Stevo, that's how I do it. Most of my tests are in an _test package so I can be sure my exported API works. Once in a while I want some extra tests on something not exported so those tests go in a separate source file. And yes, I try to do something with the filename to indicate that it conta