Fix Python – How do you generate dynamic (parameterized) unit tests in Python?

I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this:
import unittest

l = [[“foo”, “a”, “a”,], [“bar”, “a”, “b”], [“lee”, “b”, “b”]]

class TestSequence(unittest.TestCase):
def testsample(self):
for name, a,b in l:
print “test”, name