Instead of dynamically defining these tests, why not have a helper method that takes these different values as parameters? Then you can define each test to call that helper method in different ways. It becomes much easier to debug failing tests that way.