-
Notifications
You must be signed in to change notification settings - Fork 3.6k
simplify skip-if tests >> 0/n #5920
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5920 +/- ##
=======================================
- Coverage 93% 92% -1%
=======================================
Files 159 159
Lines 11380 11589 +209
=======================================
+ Hits 10624 10660 +36
- Misses 756 929 +173 |
4a851db to
fef5bde
Compare
dd98c61 to
47e9a0b
Compare
|
Why not make it |
the main point was about chaining them together and on the same line... |
IMO I'd rather have different conditions in different lines, as is usual in other projects |
so to have grouped under unitest class, since we have for an example test file where each of the included tests has 5 skips if and all the same for all tests so in the skip is most of the code and not clear reading... |
|
Ok, so there are let's say three ways to go:
6 @ less vote a bit... 1: 😄 2: 🚀 3: 🎉 4: 👀 5: 👍 cc: @PyTorchLightning/core-contributors |
|
@tadejsv @SeanNaren @SkafteNicki @akihironitta @rohitgr7 it is not exactly like the promise above as it turned out that the overwriting pytest marks would be tricky and no very sure of any accident unwanted interaction with other pytest marks such as parameterized... |
Co-authored-by: Kaushik B <[email protected]>
SkafteNicki
left a comment
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.
LGTM :]
carmocca
left a comment
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.
So why don't we provide the skipif ourselves?
return pytest.mark.skipif(condition=any(conditions), reason=reason)
does it not work?
Co-authored-by: Akihiro Nitta <[email protected]> Co-authored-by: Nicki Skafte <[email protected]>
SeanNaren
left a comment
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.
Nice. Should clean up some of these really stacked decorators finally, so nice work!
* skipif + yapf + isort * tests * docs * pp
What does this PR do?
simplify chaining skip-if in pytests
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃