def test_import_green_button_xml(consumption_gbxml_filename):
    cd = import_green_button_xml(consumption_gbxml_filename)

    assert_allclose(cd.data.values,
            [25.662, 21.021, 21.021, 21.021, 21.021,
             21.021, 25.662, 25.662, 21.021, 21.021,
             21.021, 21.021, 21.021, 25.662, 25.662,
             21.021, 21.021, 21.021, 21.021, 21.021,
             25.662, 25.662, 21.021, 21.021, 21.021,
             21.021, 21.021, 25.662, 25.662, 21.021,
             21.021, np.nan, 25.662, 25.662, 21.021,
             21.021, 21.021, 21.021, 21.021, 25.662,
             25.389, 21.021, 21.021, 21.021, 21.021,
             21.021, 25.662, 25.662, 21.021, 21.021,
             21.021, 21.021, np.nan], rtol=RTOL, atol=ATOL)
Exemple #2
0
def test_import_green_button_xml(consumption_gbxml_filename):
    ch = import_green_button_xml(consumption_gbxml_filename)

    consumptions_e = ch.electricity

    c_kWh = [c.kWh for c in consumptions_e]

    assert_allclose(c_kWh, [25.662, 21.021, 21.021, 21.021, 21.021,
                            21.021, 25.662, 25.662, 21.021, 21.021,
                            21.021, 21.021, 21.021, 25.662, 25.662,
                            21.021, 21.021, 21.021, 21.021, 21.021,
                            25.662, 25.662, 21.021, 21.021, 21.021,
                            21.021, 21.021, 25.662, 25.662, 21.021,
                            21.021, 25.662, 25.662, 21.021, 21.021,
                            21.021, 21.021, 21.021, 25.662, 25.389,
                            21.021, 21.021, 21.021, 21.021, 21.021,
                            25.662, 25.662, 21.021, 21.021, 21.021,
                            21.021], rtol=RTOL, atol=ATOL)