Skip to content

Commit

Permalink
Add monkeypatching so that it works also for runnin all the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lahtinep committed Nov 18, 2024
1 parent fbd6a5a commit 4058756
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trollflow2/tests/test_trollflow2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,10 @@ def test_valid_filter_zero_coverage(caplog, sc_3a_3b):

def test_valid_filter_no_trollsched(caplog, monkeypatch, sc_3a_3b):
"""Test filter for minimum fraction of valid data with full coverage."""
# This is needed when only this test is run
monkeypatch.setattr("trollsched.spherical.get_twilight_poly", None)
# ... and this when all the tests are run
monkeypatch.setattr("trollflow2.plugins.get_twilight_poly", None)
from trollflow2.plugins import check_valid_data_fraction

job, prods = _create_valid_filter_job_and_prods(sc_3a_3b)
Expand Down

0 comments on commit 4058756

Please sign in to comment.