Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nesting parameterized_class #102

Open
omry opened this issue Jun 11, 2020 · 2 comments
Open

Nesting parameterized_class #102

omry opened this issue Jun 11, 2020 · 2 comments

Comments

@omry
Copy link

omry commented Jun 11, 2020

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?

@ArtemBernatskyy
Copy link

+1 for this question

@markddavidoff
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants