File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 88from .conftest import assert_frame_equal , assert_series_equal
99from numpy .testing import assert_allclose
1010import pytest
11+ import pytz
1112
1213from pvlib .location import Location
1314from pvlib import solarposition , spa
@@ -683,6 +684,10 @@ def test_hour_angle_with_tricky_timezones():
683684 '2014-09-07 10:00:00' ,
684685 '2014-09-07 11:00:00' ,
685686 ]).tz_localize ('America/Santiago' )
687+
688+ with pytest .raises (pytz .exceptions .NonExistentTimeError ):
689+ times .normalize ()
690+
686691 # should not raise `pytz.exceptions.NonExistentTimeError`
687692 solarposition .hour_angle (times , longitude , eot )
688693
@@ -691,6 +696,10 @@ def test_hour_angle_with_tricky_timezones():
691696 '2014-11-02 10:00:00' ,
692697 '2014-11-02 11:00:00' ,
693698 ]).tz_localize ('America/Havana' )
699+
700+ with pytest .raises (pytz .exceptions .AmbiguousTimeError ):
701+ times .normalize ()
702+
694703 # should not raise `pytz.exceptions.AmbiguousTimeError`
695704 solarposition .hour_angle (times , longitude , eot )
696705
You can’t perform that action at this time.
0 commit comments