Skip to content

Fix avhrr_l1b_gaclac tests#3398

Merged
djhoese merged 3 commits into
pytroll:mainfrom
sfinkens:fix-avhrr-l1b-gaclac-tests
May 20, 2026
Merged

Fix avhrr_l1b_gaclac tests#3398
djhoese merged 3 commits into
pytroll:mainfrom
sfinkens:fix-avhrr-l1b-gaclac-tests

Conversation

@sfinkens
Copy link
Copy Markdown
Member

Fix avhrr_l1b_gaclac tests by adapting imports to the latest Pygac release and creating a more realistic telemetry array. Claude helped me understanding the 10bit encoding.

@sfinkens sfinkens requested review from djhoese and mraspaud as code owners May 20, 2026 11:07
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.30%. Comparing base (97d6314) to head (0dbd7e5).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3398      +/-   ##
==========================================
- Coverage   96.32%   96.30%   -0.02%     
==========================================
  Files         466      466              
  Lines       59090    59096       +6     
==========================================
- Hits        56917    56914       -3     
- Misses       2173     2182       +9     
Flag Coverage Δ
behaviourtests 3.59% <0.00%> (-0.01%) ⬇️
unittests 96.39% <100.00%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@djhoese
Copy link
Copy Markdown
Member

djhoese commented May 20, 2026

I found an edge case apparently in one of the tests:


[gw0] linux -- Python 3.11.15 /home/runner/miniconda3/envs/test-environment/bin/python3.11
    def test_time_seconds():
        """Test conversion of timecode to datetime64."""
        current = datetime.now()
>       current = current.replace(microsecond=round(current.microsecond, -3))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       ValueError: microsecond must be in 0..999999
current    = datetime.datetime(2026, 5, 20, 14, 2, 28, 999833)
satpy/tests/reader_tests/test_avhrr_l0_hrpt.py:193: ValueError

Copy link
Copy Markdown
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

LGTM

@djhoese
Copy link
Copy Markdown
Member

djhoese commented May 20, 2026

Looks like we're now only failing unstable CI with tests from test_mviri_l1b_fiduceo_nc.py. Thanks @sfinkens!

@djhoese djhoese merged commit 0688d1c into pytroll:main May 20, 2026
16 of 18 checks passed
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.

3 participants