Ejemplo n.º 1
0
def test_step_duration_between_index(timestamps, example_model_and_crs):
    # arrange
    model, crs = example_model_and_crs
    any_time_series = TimeSeries(model)
    any_time_series.timestamps = timestamps
    # act
    result = any_time_series.step_duration(1)
    # assert
    assert result.duration.days == 2
Ejemplo n.º 2
0
def test_step_duration_later_index(timestamps, example_model_and_crs):
    # arrange
    model, crs = example_model_and_crs
    any_time_series = TimeSeries(model)
    any_time_series.timestamps = timestamps
    # act
    result = any_time_series.step_duration(2)
    # assert
    assert result is None