mirror of https://github.com/stretchr/testify.git
Fix up TestSuiteLogging in verbose mode
parent
da775f0337
commit
8fb35d6c24
suite
|
@ -154,6 +154,13 @@ func TestSuiteLogging(t *testing.T) {
|
||||||
|
|
||||||
assert.Nil(t, err, "Got an error trying to capture stdout!")
|
assert.Nil(t, err, "Got an error trying to capture stdout!")
|
||||||
|
|
||||||
|
// Failed tests' output is always printed
|
||||||
assert.Contains(t, output, "TESTLOGFAIL")
|
assert.Contains(t, output, "TESTLOGFAIL")
|
||||||
|
|
||||||
|
if testing.Verbose() {
|
||||||
|
// In verbose mode, output from successful tests is also printed
|
||||||
|
assert.Contains(t, output, "TESTLOGPASS")
|
||||||
|
} else {
|
||||||
assert.NotContains(t, output, "TESTLOGPASS")
|
assert.NotContains(t, output, "TESTLOGPASS")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue