99from nowcasting_dataset .data_sources .sun .sun_model import Sun
1010
1111
12- def test_sun_init (): # noqa: D103
13- _ = sun_fake (batch_size = 4 , seq_length_5 = 17 )
12+ def test_sun_init (configuration ): # noqa: D103
13+ configuration .process .batch_size = 4
14+ _ = sun_fake (configuration = configuration )
1415
1516
16- def test_sun_validation (): # noqa: D103
17- sun = sun_fake (batch_size = 4 , seq_length_5 = 17 )
17+ def test_sun_validation (configuration ): # noqa: D103
18+ configuration .process .batch_size = 4
19+ sun = sun_fake (configuration = configuration )
1820
1921 Sun .model_validation (sun )
2022
@@ -23,8 +25,9 @@ def test_sun_validation(): # noqa: D103
2325 Sun .model_validation (sun )
2426
2527
26- def test_sun_validation_elevation (): # noqa: D103
27- sun = sun_fake (batch_size = 4 , seq_length_5 = 17 )
28+ def test_sun_validation_elevation (configuration ): # noqa: D103
29+ configuration .process .batch_size = 4
30+ sun = sun_fake (configuration = configuration )
2831
2932 Sun .model_validation (sun )
3033
@@ -33,8 +36,9 @@ def test_sun_validation_elevation(): # noqa: D103
3336 Sun .model_validation (sun )
3437
3538
36- def test_sun_validation_azimuth (): # noqa: D103
37- sun = sun_fake (batch_size = 4 , seq_length_5 = 17 )
39+ def test_sun_validation_azimuth (configuration ): # noqa: D103
40+ configuration .process .batch_size = 4
41+ sun = sun_fake (configuration = configuration )
3842
3943 Sun .model_validation (sun )
4044
@@ -43,9 +47,11 @@ def test_sun_validation_azimuth(): # noqa: D103
4347 Sun .model_validation (sun )
4448
4549
46- def test_sun_save (): # noqa: D103
50+ def test_sun_save (configuration ): # noqa: D103
51+
52+ configuration .process .batch_size = 4
4753 with tempfile .TemporaryDirectory () as dirpath :
48- sun = sun_fake (batch_size = 4 , seq_length_5 = 17 )
54+ sun = sun_fake (configuration = configuration )
4955 sun .save_netcdf (path = dirpath , batch_i = 0 )
5056
5157 assert os .path .exists (f"{ dirpath } /sun/000000.nc" )
0 commit comments