-
Notifications
You must be signed in to change notification settings - Fork 320
Open
Labels
Description
Describe the bug
The test TestParallaxCorrectionSceneLoad.test_no_compute in modifier_tests/test_parallax.py takes more than 8 seconds. This is due to network access to get a TLE:
Lines 425 to 433 in 6d843f6
| name = cth_dataset.attrs["platform_name"] | |
| tle = tlefile.read(name) | |
| es = EarthSatellite(tle.line1, tle.line2, name) | |
| ts = load.timescale() | |
| gc = es.at(ts.from_datetime( | |
| cth_dataset.attrs["start_time"].replace(tzinfo=datetime.timezone.utc))) | |
| (lat, lon) = wgs84.latlon_of(gc) | |
| height = wgs84.height_of(gc).to("km") | |
| return (lon.degrees, lat.degrees, height.value) |
The test should provide a toy TLE in some way so that no network access is performed.
To Reproduce
pytest --durations=10 test_parallax.pyExpected behavior
Ideally, all tests should be fast (less than 100 ms at most).
Actual results
9.06s call satpy/tests/modifier_tests/test_parallax.py::TestParallaxCorrectionSceneLoad::test_no_compute
Environment Info:
- Satpy Version: main
Additional context
The automatic downloading is due to github.com/pytroll/pyorbital/pull/210, but after that one is fixed we still need to fix this test to provide the TLEs somehow.