wolever / parameterized

Parameterized testing with any Python test framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nesting parameterized_class

omry opened this issue · comments

With Pytest I routinely nest parameterizations.

@parameterized_class(
    "X", [1, 2],
)
@parameterized_class(
    "Y", [10, 20],
)
class TestTutorials(unittest.TestCase):
    def test_stuff(self):
       ...

I tried something similar got got an error:

parameterized/parameterized.py", line 573, in decorator
    test_class_module = sys.modules[base_class.__module__].__dict__
AttributeError: 'NoneType' object has no attribute '__module__'

Is this kind of usage supported?

+1 for this question

+1 guess i asked this in a different way over at #121