Description
Related to #473 and #1722. If testing.T.Skip is called in BeforeTest, we should skip that test and its teardowns. If it's called in the suite setup, we should skip the entire suite.
Step To Reproduce
package kata_test
import (
"testing"
"github.com/stretchr/testify/suite"
)
type My struct {
suite.Suite
}
func (m *My) BeforeTest(s, t string) {
m.T().Skip()
panic("before")
}
func (m *My) AfterTest(s, t string) {
panic("after")
}
func (m *My) TestA() {
panic("during")
}
func TestIfy(t *testing.T) {
suite.Run(t, &My{})
}
Expected behavior
No panics
Actual behavior
panic: "after"
Description
Related to #473 and #1722. If
testing.T.Skipis called in BeforeTest, we should skip that test and its teardowns. If it's called in the suite setup, we should skip the entire suite.Step To Reproduce
Expected behavior
No panics
Actual behavior
panic:
"after"