class UnderTest_MixIn(object):

    def f1(self, i):
        return i + 1

def f2(self, i):
    return i + 2
SomeDynamicTestcase = type('SomeDynamicTestcase', (UnderTest_MixIn,
    unittest.TestCase), {'even_more_dynamic': 'attributes ..'})
name = 'SomeDynamicTestcase'
globals()[name] = type(name, (UnderTest_MixIn, unittest.TestCase), {
    'even_more_dynamic': 'attributes ..'})
How do I get nose to discover dynamically-generated testcases?