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
Avocado.skip* usable on classes [v2] #3570
Conversation
This commit expand the avocado.skip* decorators from methods to classes. When a user uses skip decorator on the class, the decorator is applied to every class method. Reference: avocado-framework#3473 Signed-off-by: Jan Richter <jarichte@redhat.com>
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Codecov Report
@@ Coverage Diff @@
## master #3570 +/- ##
==========================================
- Coverage 70.07% 70.05% -0.03%
==========================================
Files 137 137
Lines 16861 16871 +10
==========================================
+ Hits 11816 11819 +3
- Misses 5045 5052 +7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code tested, working as expected, LGTM!
|
While I like the functionality, I think there's room for discussion regarding the concepts here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment :)
I agree that the implementation you described would fulfill the requirements you described and would be more efficient. |
|
@apahim, yes, you are right that skipping class should skip execution of all class code. But I think that to do that, we have to use a completely different approach than with skipping methods. And I am not sure if it's possible to accomplish that with python decorators. We were discussing that, on a meeting today, and it came up an idea that we can use this solution for now, because it handles most of the requirements, and also start looking for a more sophisticated solution that will be skipping whole class code. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't block this PR, sure, just wanted to make sure we know all the implications here.
|
I created issue #3579 that focus on skipping the whole classes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we can evolve this implementation in a later stage. Thanks for the code and the review guys!
This commit expand the avocado.skip* decorators from methods to classes.
When a user uses skip decorator on the class, the decorator is applied
to every class method.
Reference: #3473
Signed-off-by: Jan Richter jarichte@redhat.com
Changes from v1 (#3566):
valueisinstance(obj, type)