Beispiel #1
0
def test_import_csv(consumption_csv_filename):

    ch = import_csv(consumption_csv_filename)

    assert len(ch.natural_gas) == 1
    assert len(ch.electricity) == 1
    assert_allclose(ch.natural_gas[0].therms,25,rtol=RTOL,atol=ATOL)
    assert_allclose(ch.electricity[0].kWh,1000,rtol=RTOL,atol=ATOL)
    assert ch.natural_gas[0].estimated
    assert not ch.electricity[0].estimated
    assert ch.natural_gas[0].timedelta.days == 30
    assert ch.electricity[0].timedelta.days == 35