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

Is is possible to combine @parameterized_class with existing @patch decorators? #124

Open
raner opened this issue May 14, 2021 · 0 comments

Comments

@raner
Copy link

raner commented May 14, 2021

I have a piece of code similar to the following:

@patch('service.account.utils.AccountManager.get_service', MOCK_SERVICE)
# ... more @patch decorators ...
@parameterized_class('provider', [
   (GCPServiceProvider(),),
   (AWSServiceProvider(),),
])
class ServiceTestCase(BaseTestCase):
# ... tests

Should it be possible to use @parameterized_class in conjunction with existing @patch decorators at the class level? When I add the @parameterized_class annotation I end up with a No tests were found message and no tests being executed at all. The same thing happens independent of whether I add the @parameterized_class decorator as the first or the last decorator in the stack.

Is this generally supported or am I combining things that don't really go together?

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

1 participant