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

parameterized_class does not work with inheritence #173

Open
tjbrix opened this issue Jun 7, 2023 · 2 comments
Open

parameterized_class does not work with inheritence #173

tjbrix opened this issue Jun 7, 2023 · 2 comments

Comments

@tjbrix
Copy link

tjbrix commented Jun 7, 2023

@parameterized_class("X", [1,2])
class BaseClass(unittest.TestCase):
     #code

class SubClass(BaseClass):
    def test_func(self):
        print(self.X)

=> Class SubClass has no Attribute X

Ich verwende nose2.

@wangkun611
Copy link

parameterized_class generates lots of new classes based on parameters and remove all test methods of BaseClass. The name of new classes may be BaseClass_0X1,BaseClass_1X2 or whatever.
You should not write a new class inherited from BaseClass.

@eltoder
Copy link

eltoder commented Aug 15, 2024

What would you expect to happen? What value should self.X be in SubClass?

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