Skip to content

Commit a80ae30

Browse files
committed
TST: decorate test_get_psm3 with needs_pandas_0_22
1 parent 05cf879 commit a80ae30

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

pvlib/test/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def pandas_0_22():
9494
return parse_version(pd.__version__) >= parse_version('0.22.0')
9595

9696

97+
needs_pandas_0_22 = pytest.mark.skipif(
98+
not pandas_0_22(), reason='requires pandas 0.22 or greater')
99+
100+
97101
def has_spa_c():
98102
try:
99103
from pvlib.spa_c_files.spa_py import spa_calc

pvlib/test/test_psm3.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import os
66
from pvlib.iotools import psm3
7+
from pvlib.test.conftest import needs_pandas_0_22
78
import numpy as np
89
import pandas as pd
910
import pytest
@@ -22,6 +23,7 @@
2223
'Wind Speed', 'Surface Albedo Units', 'Version']
2324

2425

26+
@needs_pandas_0_22
2527
def test_get_psm3():
2628
"""test get_psm3"""
2729
header, data = psm3.get_psm3(LATITUDE, LONGITUDE)

0 commit comments

Comments
 (0)