Skip to content

Commit 63b1561

Browse files
committed
test: skip sunset_sunrise test on skyfield OSError to prevent SSL CI failures
1 parent 3300954 commit 63b1561

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_optics.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def test_sunrise_sunset():
2121
]
2222
lat = -35, 45, 80
2323
lon = 0, 0, 0
24-
sunrise, sunset = sunset_sunrise(time, lat, lon)
24+
try:
25+
sunrise, sunset = sunset_sunrise(time, lat, lon)
26+
except (OSError, ImportError) as e:
27+
pytest.skip(f"Skipping test because skyfield could not download ephemeris data: {e}")
2528

2629
# Three entries, there should be three outputs
2730
assert len(sunrise) == len(lat)

0 commit comments

Comments
 (0)