testing

Extensions of the unittest module.

nutils.testing.parametrize(TestCase)

Parametrize a unittest.TestCase.

>>> @parametrize
... class TestSomething(unittest.TestCase):
...   def test_equality(self):
...     self.assertEqual(self.x, self.y)
>>> TestSomething(x=1, y=1)
>>> TestSomething(x=2, y=2)