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\
The metaclass-based answers still work in Python3, but instead of the __metaclass__ attribute one has to use the metaclass parameter, as in:
__metaclass__
metaclass
class ExampleTestCase(TestCase,metaclass=DocTestMeta): pass