parameterized icon indicating copy to clipboard operation
parameterized copied to clipboard

Nesting parameterized_class

Open omry opened this issue 5 years ago • 2 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?

omry avatar Jun 11 '20 03:06 omry

+1 for this question

ArtemBernatskyy avatar Oct 01 '20 10:10 ArtemBernatskyy

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

markddavidoff avatar Mar 26 '21 19:03 markddavidoff