lsst.utils.tests.methodParameters(**settings: Sequence[Any]) Callable

Iterate over supplied settings to create subtests automatically.

This decorator iterates over the supplied settings, using TestCase.subTest to communicate the values in the event of a failure.

**settingsdict (str: iterable)

The lists of test parameters. Each should be an iterable of the same length.


@methodParameters(foo=[1, 2], bar=[3, 4])
def testSomething(self, foo, bar):

will run:

testSomething(foo=1, bar=3)
testSomething(foo=2, bar=4)