Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 8c0dedf

Browse files
committed
add test
1 parent 4b2f23d commit 8c0dedf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/data_sources/sun/test_sun_data_source.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,21 @@ def test_get_example_different_year(test_data_folder): # noqa 103
4343

4444
assert len(example.elevation) == 19
4545
assert len(example.azimuth) == 19
46+
47+
48+
def test_get_load_live(): # noqa 103
49+
50+
sun_data_source = SunDataSource(
51+
zarr_path="", history_minutes=30, forecast_minutes=60, load_live=True
52+
)
53+
54+
x = 256895.63164759654
55+
y = 666180.3018829626
56+
start_dt = pd.Timestamp("2021-04-01 12:00:00.000")
57+
58+
example = sun_data_source.get_example(
59+
location=SpaceTimeLocation(t0_datetime_utc=start_dt, x_center_osgb=x, y_center_osgb=y)
60+
)
61+
62+
assert len(example.elevation) == 19
63+
assert len(example.azimuth) == 19

0 commit comments

Comments
 (0)