Skip to content

Commit 2e97917

Browse files
committed
correct-test-indention-and-class
1 parent 24d0779 commit 2e97917

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

pvlib/tests/test_spa.py

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import datetime as dt
33
import warnings
44
import pytest
5+
import pylib
56

67
try:
78
from importlib import reload
@@ -425,27 +426,27 @@ def test_solar_position_multithreaded(self):
425426
times, lat, lon, elev, pressure, temp, delta_t,
426427
atmos_refract, numthreads=3, sst=True)[:3], 5)
427428

428-
# Define extra test cases for issue #2077
429-
test_cases_issue_2207 = [
430-
((2000, 1, 1, 12, 0, 0), 2451545.0),
431-
((1999, 1, 1, 0, 0, 0), 2451179.5),
432-
((1987, 1, 27, 0, 0, 0), 2446822.5),
433-
((1987, 6, 19, 12, 0, 0), 2446966.0),
434-
((1988, 1, 27, 0, 0, 0), 2447187.5),
435-
((1988, 6, 19, 12, 0, 0), 2447332.0),
436-
((1900, 1, 1, 0, 0, 0), 2415020.5),
437-
((1600, 1, 1, 0, 0, 0), 2305447.5),
438-
((1600, 12, 31, 0, 0, 0), 2305812.5),
439-
((837, 4, 10, 7, 12, 0), 2026871.8),
440-
((-123, 12, 31, 0, 0, 0), 1676496.5),
441-
((-122, 1, 1, 0, 0, 0), 1676497.5),
442-
((-1000, 7, 12, 12, 0, 0), 1356001.0),
443-
((-1000, 2, 29, 0, 0, 0), 1355866.5),
444-
((-1001, 8, 17, 21, 36, 0), 1355671.4),
445-
((-4712, 1, 1, 12, 0, 0), 0.1),
446-
]
447-
448-
@pytest.mark.parametrize("inputs, expected", test_cases_issue_2207)
449-
def test_julian_day_issue_2207(inputs, expected):
450-
result = pvlib.spa.julian_day_dt(*inputs, microsecond=0)
451-
assert result == expected, f"Failed for inputs {inputs}: expected {expected}, got {result}"
429+
# Define extra test cases for issue #2077
430+
test_cases_issue_2207 = [
431+
((2000, 1, 1, 12, 0, 0), 2451545.0),
432+
((1999, 1, 1, 0, 0, 0), 2451179.5),
433+
((1987, 1, 27, 0, 0, 0), 2446822.5),
434+
((1987, 6, 19, 12, 0, 0), 2446966.0),
435+
((1988, 1, 27, 0, 0, 0), 2447187.5),
436+
((1988, 6, 19, 12, 0, 0), 2447332.0),
437+
((1900, 1, 1, 0, 0, 0), 2415020.5),
438+
((1600, 1, 1, 0, 0, 0), 2305447.5),
439+
((1600, 12, 31, 0, 0, 0), 2305812.5),
440+
((837, 4, 10, 7, 12, 0), 2026871.8),
441+
((-123, 12, 31, 0, 0, 0), 1676496.5),
442+
((-122, 1, 1, 0, 0, 0), 1676497.5),
443+
((-1000, 7, 12, 12, 0, 0), 1356001.0),
444+
((-1000, 2, 29, 0, 0, 0), 1355866.5),
445+
((-1001, 8, 17, 21, 36, 0), 1355671.4),
446+
((-4712, 1, 1, 12, 0, 0), 0.1),
447+
]
448+
449+
@pytest.mark.parametrize("inputs, expected", test_cases_issue_2207)
450+
def test_julian_day_issue_2207(inputs, expected):
451+
result = pvlib.spa.julian_day_dt(*inputs, microsecond=0)
452+
assert result == expected, f"Failed for inputs {inputs}"

0 commit comments

Comments
 (0)