-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Improvements] Refactor unittest folder structre #386
Conversation
Codecov Report
@@ Coverage Diff @@
## master #386 +/- ##
==========================================
- Coverage 80.50% 80.41% -0.10%
==========================================
Files 186 186
Lines 9936 9936
Branches 1450 1450
==========================================
- Hits 7999 7990 -9
- Misses 1744 1750 +6
- Partials 193 196 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
||
import pytest | ||
|
||
# yapf: disable |
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.
Can yapf be enabled?
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.
It will conflict with isort
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.
Yes isort is a stubborn package, and it often conflicts with yapf.
As a fix, please copy the yapf config section here https://github.com/open-mmlab/mmpose/blob/202983d24665a909ae1c45f4025d66794b9e32fd/setup.cfg#L10 and try again.
Really hope there's a better alternative for isort. Before that, pls try the above method and enable yapf
|
||
# yapf: enable | ||
|
||
|
||
def check_keys_contain(result_keys, target_keys): |
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.
This helper function is defined many times. Please
- Make a pull request to mmcv, see examples here https://github.com/open-mmlab/mmcv/blob/master/mmcv/utils/testing.py
- Adding it to
mmedit/utils/test_utils.py
and use it for now since mmcv is slow in response.
Good to go modulus the above two comments. |
Signed-off-by: lizz <[email protected]>
* [Improvements] Refactor unittest folder structre * Fix * Enable yapf Signed-off-by: lizz <[email protected]> Co-authored-by: liyinshuo <[email protected]> Co-authored-by: lizz <[email protected]>
No description provided.