core: return explicit caption if tests fail to construct context

The previous error was very generic, making it hard to quickly tell from
the test output that the error was during context initialization.
This commit is contained in:
Martin Atkins 2017-04-21 15:43:15 -07:00
parent 8bfc6e7b1c
commit 1c0b715999

View File

@ -151,7 +151,7 @@ func testContext2(t *testing.T, opts *ContextOpts) *Context {
ctx, err := NewContext(opts)
if err != nil {
t.Fatalf("err: %s", err)
t.Fatalf("failed to create test context\n\n%s\n", err)
}
return ctx