Skip to content

Commit d49b53a

Browse files
committed
more explicit test for 2/29/1996 in tmy3
1 parent abf071a commit d49b53a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pvlib/tests/iotools/test_tmy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from pandas.util.testing import network
22
import numpy as np
3+
import pandas as pd
34
from pvlib.iotools import tmy
45
from conftest import DATA_DIR
56

@@ -62,7 +63,8 @@ def test_gh865_read_tmy3_feb_leapyear_hr24():
6263
assert meta == greensboro
6364
# February for Greensboro is 1996, a leap year, so check to make sure there
6465
# aren't any rows in the output that contain Feb 29th
65-
assert data['1996-02-29 00:00'].size == 0
66+
assert data.index[1414] == pd.Timestamp('1996-02-28 23:00:00-0500')
67+
assert data.index[1415] == pd.Timestamp('1996-03-01 00:00:00-0500')
6668
# now check if it parses correctly when we try to coerce the year
6769
data, _ = read_tmy3(TMY3_FEB_LEAPYEAR, coerce_year=1990)
6870
# if get's here w/o an error, then gh865 is fixed, but let's check anyway

0 commit comments

Comments
 (0)