This started as me fixing the minor bug in https://github.com/samtools/htsjdk/issues/1614. I got annoyed with something that I am regularly annoyed with, needing different data providers for the severals sets of test cases I want to run even though they run the same code.
I often want to right the following test cases for the same function:
The function matches a given value
The function mismatches the value
The function throws a specific exception.
I added a helper that lets you capture those cases in one data provider.
This started as me fixing the minor bug in https://github.com/samtools/htsjdk/issues/1614. I got annoyed with something that I am regularly annoyed with, needing different data providers for the severals sets of test cases I want to run even though they run the same code.
I often want to right the following test cases for the same function:
I added a helper that lets you capture those cases in one data provider.
It's used as an element in the data provider and then tested by calling it's test function:
It seems like a useful thing to me, but I'm wanted to get feedback on the idea.