File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ def find_shadows(self):
191191
192192 pos_obj = get_position (valid_datetimes , valid_lons , valid_lats )
193193
194- valid_sun_altitudes = pos_obj ["altitude" ] # in radians
194+ valid_sun_altitudes = np . array ( pos_obj ["altitude" ]) # in radians
195195
196196 # If object height and shadow length are set the sun altitudes are used
197197 # to calculate the shadow lengths across the world and then compared to
Original file line number Diff line number Diff line change @@ -15,3 +15,25 @@ def test_creation_with_valid_arguments_should_pass():
1515 ShadowFinder (
1616 object_height = object_height , shadow_length = shadow_length , date_time = date_time
1717 )
18+
19+
20+ def _gen_simple_finder_local_time ():
21+ object_height = 6
22+ shadow_length = 3.2
23+ date_time = datetime .now ()
24+
25+ return ShadowFinder (
26+ object_height = object_height ,
27+ shadow_length = shadow_length ,
28+ date_time = date_time ,
29+ time_format = "local" ,
30+ )
31+
32+
33+ def test_creation_with_valid_arguments_local_time_format_should_pass ():
34+ _gen_simple_finder_local_time ()
35+
36+
37+ def test_find_shadows_with_local_time_format ():
38+ finder = _gen_simple_finder_local_time ()
39+ finder .find_shadows ()
You can’t perform that action at this time.
0 commit comments