From 4058756893421c247ad399895a6cf23cc9a7ecd6 Mon Sep 17 00:00:00 2001 From: Panu Lahtinen Date: Mon, 18 Nov 2024 13:14:31 +0200 Subject: [PATCH] Add monkeypatching so that it works also for runnin all the tests --- trollflow2/tests/test_trollflow2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trollflow2/tests/test_trollflow2.py b/trollflow2/tests/test_trollflow2.py index 86928cd..7ae131b 100644 --- a/trollflow2/tests/test_trollflow2.py +++ b/trollflow2/tests/test_trollflow2.py @@ -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)