-
Notifications
You must be signed in to change notification settings - Fork 43
Switch tests to use a testing framework that provides fixtures (test setup / tear down functions). #187
Comments
What about using go sub-tests? https://blog.golang.org/subtests (search for "Setup and Tear-down") As for the more friendly asserts, it seems the consensus is https://github.com/stretchr/testify/assert (look at the star numbers!) |
A quick look suggests that
|
Sub-tests aren't a package, just a new method
|
Yeah, I saw that example, but I want a per test setup / teardown function: I explicitly don't want to have to add 2 calls per existing test function for that. |
seems at the very least this is implicitly below ZBB line :). Is this something we still want to pursue and should keep in our backlog, @jodh-intel ? |
I think it would be useful, but we've survived this long without it. Feel free to close so we can resurrect at a later time if needed... |
The tests are currently using the
testing
package, but http://labix.org/gocheck is much more powerful (and compatible withtesting
). Crucially the latter offers test fixtures likeSetUpTest()
andTearDownTest()
to simplify the test code.Such fixtures will be useful for #163.
The text was updated successfully, but these errors were encountered: