Exemplo n.º 1
0
 def test_convert_index_from_UTC(self):
     out = tstoolbox.convert_index('number',
                                   input_ts='tests/data_sunspot.csv',
                                   interval='M',
                                   epoch='1850-01-01')
     out.index.name = '1850-01-01_date'
     assert_frame_equal(out, self.read_direct)
Exemplo n.º 2
0
def test_raises():
    with pytest.raises(ValueError):
        out = tstoolbox.convert_index(
            "zebra",
            input_ts="tests/data_gainesville_daily_precip.csv",
            interval="D",
            epoch="julian",
        )
Exemplo n.º 3
0
def test_epoch_interval(epoch, interval, expected):
    out = tstoolbox.convert_index(
        "number",
        input_ts="tests/data_gainesville_daily_precip.csv",
        interval=interval,
        epoch=epoch,
    )
    assert out.index[1] == expected
Exemplo n.º 4
0
 def test_convert_index_from_UTC(self):
     out = tstoolbox.convert_index(
         "number",
         input_ts="tests/data_gainesville_daily_precip.csv",
         interval="D",
         epoch="1979-12-30",
     )
     out.index.name = "1979-12-30_date"
     assert_frame_equal(out, self.read_direct)