-
Notifications
You must be signed in to change notification settings - Fork 321
Migrate FCI tests to pytest #1180
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
Migrate FCI tests to pytest. This enables the more flexible set of fixtures available there. This will be needed by at least one of the tests to be added in pytroll#1177
|
CodeFactor is wrong to complain here. PEP 8 prohibits a bare test of
Since pylint-dev/pylint#2815 (apparently not merged in the version CodeFactor uses), pylint reportedly no longer complains about explicit comparisons of |
mraspaud
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, just one typo.
|
The test is failing because the previous test contained a bug, which I serendipitously fixed:
This should have been which is correct. |
Fix a pre-existing typo in the caplog.text test (thanks @mraspaud). Co-authored-by: Martin Raspaud <martin.raspaud@smhi.se>
The FCI filenames matching test was buggy in multiple ways. It was passing six filenames and expecting four to match, even though five were meeting the correct format. This didn't fail in the past, because it was using assertTrue rather than assertEquals. Now that a previous commit has fixed the assertion the test has started failing. I don't know why I ever expected 4 rather than 5 out of 6 filenames to pass, this commit removes the one I was wrongly expecting to not pass from the list of test filenames.
mraspaud
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
Codecov Report
@@ Coverage Diff @@
## master #1180 +/- ##
=======================================
Coverage 89.61% 89.61%
=======================================
Files 200 200
Lines 29522 29523 +1
=======================================
+ Hits 26457 26458 +1
Misses 3065 3065
Continue to review full report at Codecov.
|
This commit resolves a serious merge conflict (11 locations with conflicting merge) after https://github.com/pytroll/satpy/pull/1135/files was merged into master. I hope I didn't break anything; tests and flake8 see to pass.
Migrate FCI tests to pytest. This enables the more flexible set of
fixtures available there. This will be needed by at least one of the
tests to be added in #1177
flake8 satpy