Skip to content

Add a unit test for the CO2 corrector#3371

Open
gerritholl wants to merge 2 commits into
pytroll:mainfrom
gerritholl:test-co2-cerroctor
Open

Add a unit test for the CO2 corrector#3371
gerritholl wants to merge 2 commits into
pytroll:mainfrom
gerritholl:test-co2-cerroctor

Conversation

@gerritholl

Copy link
Copy Markdown
Member

Add a unit test for satpy.modifiers.atmosphere.CO2Corrector.

Also move other atmospheric modifier unit tests to their own test module.

  • Tests added

@codecov

codecov Bot commented Apr 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.33%. Comparing base (fbfbe21) to head (08410ef).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3371      +/-   ##
==========================================
+ Coverage   96.32%   96.33%   +0.01%     
==========================================
  Files         466      467       +1     
  Lines       59096    59119      +23     
==========================================
+ Hits        56922    56953      +31     
+ Misses       2174     2166       -8     
Flag Coverage Δ
behaviourtests 3.59% <0.00%> (-0.01%) ⬇️
unittests 96.42% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gerritholl

Copy link
Copy Markdown
Member Author

CodeScene is complaining about code that I moved but did not otherwise touch. An attempt to suppress the finding still fails with "Error occurred while suppressing! Please try again." I don't know if the suppression has ever worked (for me it never has).

@djhoese

djhoese commented Apr 8, 2026

Copy link
Copy Markdown
Member

Maybe I'm misunderstanding, but we don't want to suppress what CodeScene is finding since it is an actual problem. We just won't let it stop this PR from being merged as it isn't a new issue you are adding.

@gerritholl

Copy link
Copy Markdown
Member Author

Maybe I'm misunderstanding, but we don't want to suppress what CodeScene is finding since it is an actual problem. We just won't let it stop this PR from being merged as it isn't a new issue you are adding.

Ok :) My reasoning was that if there are any red checkmarks on a PR that human reviewers might not look at it. If you're saying it won't stop this PR then that works or me.

Mode tests for modifiers in modifiers/atmosphere.py to their own test
module in tests/modifier_tests/test_atmosphere.py.
@djhoese djhoese force-pushed the test-co2-cerroctor branch from bf75088 to 08410ef Compare June 16, 2026 15:36
@djhoese

djhoese commented Jun 16, 2026

Copy link
Copy Markdown
Member

I'm going to rebase this first just to make sure everything is still good since it's been a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants