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

Convert CF Writer tests to pytest #2523

Merged
merged 8 commits into from
Jun 27, 2023
Merged

Conversation

ghiggi
Copy link
Contributor

@ghiggi ghiggi commented Jun 27, 2023

  • Closes #xxxx
  • Tests added
  • Fully documented
  • Add your name to AUTHORS.md if not there already

Convert CFWriter test units from unitest to pytest

@ghiggi ghiggi marked this pull request as draft June 27, 2023 15:23
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #2523 (a7f28e0) into main (bcd6581) will decrease coverage by 0.09%.
The diff coverage is 86.66%.

@@            Coverage Diff             @@
##             main    #2523      +/-   ##
==========================================
- Coverage   94.96%   94.88%   -0.09%     
==========================================
  Files         347      347              
  Lines       50921    50931      +10     
==========================================
- Hits        48358    48326      -32     
- Misses       2563     2605      +42     
Flag Coverage Δ
behaviourtests 4.31% <0.00%> (-0.01%) ⬇️
unittests 95.48% <86.66%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/tests/writer_tests/test_cf.py 95.53% <86.66%> (-4.06%) ⬇️

... and 7 files with indirect coverage changes

@ghiggi ghiggi marked this pull request as ready for review June 27, 2023 16:31

def test_collect_cf_dataarrays_with_latitude_named_lat(self, *mocks):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mocks not needed I guess ...

@djhoese djhoese added component:writers cleanup Code cleanup but otherwise no change in functionality labels Jun 27, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5392538598

  • 130 of 150 (86.67%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.06%) to 95.46%

Changes Missing Coverage Covered Lines Changed/Added Lines %
satpy/tests/writer_tests/test_cf.py 130 150 86.67%
Files with Coverage Reduction New Missed Lines %
satpy/writers/cf_writer.py 1 94.9%
satpy/tests/writer_tests/test_cf.py 10 95.53%
Totals Coverage Status
Change from base Build 5389825507: -0.06%
Covered Lines: 48450
Relevant Lines: 50754

💛 - Coveralls

@ghiggi
Copy link
Contributor Author

ghiggi commented Jun 27, 2023

@djhoese I think is ready

Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. For the record, you could have used setup_method instead of converting the fake datasets to fixtures, but I'm guessing you knew that. Thanks for cleaning this up. Let's merge it...

@djhoese djhoese merged commit 296c819 into pytroll:main Jun 27, 2023
@ghiggi ghiggi deleted the refactor-cf-tests branch June 27, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanup but otherwise no change in functionality component:writers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants