rik0/ParamUnittest — pull request #3 by rubik (2012-09-23 08:14:43+00:00)
Title: Return new_class so that subclassing is possible

I have some test cases which need to be run only under certain conditions.
To that end I'm using the `parametrized` decorator together with `unittest.skipIf` on a class:
```
@parametrized(*BLOCKS_CASES)
class TestSimpleBlocks(ParametrizedTestCase):
'''Test simple blocks.'''

def setParameters(self, code, expected_complexity):
self.code = dedent(code)
self.expected_complexity = expected_complexity

def testComplexityVisitor(self):
visitor = ComplexityVisitor.from_code(self.code)
self.assertEqual(visitor.complexity, self.expected_complexity)

@parametrized(*ADDITIONAL_BLOCKS)
@unittest.skipIf(sys.version_info[:2] < (2, 7),
'not supported in this Python version')
class TestAdditionalBlocks(TestSimpleBlocks):
'''Test set and dict comprehensions.'''
```

To make this work I changed this line:

return None
return magic_module_set_test_case

to:

return new_class
return magic_module_set_test_case