for lhs, rhs, res, tag in [
(1, 1, 2, "thing1"),
(2, 3, 5, "thing2"),
(3, 4, 7, "thing3"),
]:
@test("simple addition", tags=[tag])
def _(left=lhs, right=rhs, result=res):
assert left + right == result
You can then select individual tests using something like `ward --tags thing2` to only run tests with that tag (in my example, the 2nd of 3 tests). for lhs, rhs, res in [
(1, 1, 2),
(2, 3, 5),
]:
@test("simple addition")
def _(left=lhs, right=rhs, result=res):
assert left + right == result
I'm considering how/whether to add a pytest style decorator for parameterisation too.