Open denis-tingaikin opened 3 years ago
Potential fix: https://github.com/stretchr/testify/pull/1051
Looking at the description of the testify.m
parameter, it's meant to match tests rather than suites. The behaviour that you have noticed therefore seems correct to me.
Also, changing this would necessitate a breaking change and therefore would be merged in v2 at the earliest.
@boyan-soubachov OK, Do you have an idea about a pure fix for the issue?
I see these solutions:
suite name regex
. If the flag is passed then the flag with test matching will be applying only for the passed suite. For example: go test ./... -testify.m="Test1" -testify.s="Suite1"
will mean something like: run all tests but for suite1 run only Test1.
Hello guys,
We've found one funny thing about
suite.Run
. It allows running inner suites (that look awesome to me :) ). But this working some strange if passed testify.m parameter.For example:
So if I just run
TestSuite2
then it works fine (suite2 runs all tests from suite1). But if I runTestSuite2
with paramter-testify.m="Test2"
then suite1 will be ignored.Please share your thoughts about: