Exemple #1
0
def test_read_psm3_map_variables():
    """test read_psm3 map_variables=True"""
    data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=True)
    columns_mapped = [
        'Year', 'Month', 'Day', 'Hour', 'Minute', 'dhi', 'dni', 'ghi',
        'dhi_clear', 'dni_clear', 'ghi_clear', 'Cloud Type', 'Dew Point',
        'solar_zenith', 'Fill Flag', 'albedo', 'wind_speed',
        'precipitable_water', 'wind_direction', 'relative_humidity',
        'temp_air', 'pressure'
    ]
    data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=True)
    assert_index_equal(data.columns, pd.Index(columns_mapped))
def test_read_psm3():
    """test read_psm3"""
    header, data = psm3.read_psm3(MANUAL_TEST_DATA)
    expected = pd.read_csv(YEAR_TEST_DATA)
    assert_psm3_equal(header, data, expected)
Exemple #3
0
def test_psm3_variable_map_deprecation_warning(nrel_api_key):
    with pytest.warns(pvlibDeprecationWarning, match='names will be renamed'):
        _ = psm3.read_psm3(MANUAL_TEST_DATA)
Exemple #4
0
def test_read_psm3():
    """test read_psm3"""
    data, metadata = psm3.read_psm3(MANUAL_TEST_DATA, map_variables=False)
    expected = pd.read_csv(YEAR_TEST_DATA)
    assert_psm3_equal(data, metadata, expected)