I frequently encounter situation where I have very basic tests, and if those fail, it doesn't make sense to run many other tests. Therefore I want to declare a tree of dependencies between my tests, where tests are only run if all pre-conditions tests are passing. two big advantages I can think of are:
- During debugging I do not see more advanced tests failing, making the problem more obvious.
- Tests will complete faster.
Example: I have implemented running average filter. First test is that the signal has the same amount of samples after applying this filter. Next, I want to test further mathematical properties of my signal, but tests are bound to fail if first condition is not satisfied (same amount of samples).
Is this a known concept? is this what test suites are? I am also interested if this is available in pytest which I currently use.