def test_WaitingTime_get_start_delay_negative(metocean_synth):

    test = WaitingTime(metocean_synth)

    olc = {'maxHs': 0.5, 'maxTp': 0.5, 'maxWs': 0.5, 'maxCs': 0.5}

    windows = test.get_weather_windows(olc)
    start_date_met = dt.datetime(2000, 1, 3)

    with pytest.raises(RuntimeError):
        test._get_start_delay(windows, start_date_met, 0)
def test_WaitingTime_get_start_delay(metocean_synth, test_input, expected):

    test = WaitingTime(metocean_synth)

    olc = {'maxHs': 0.5, 'maxTp': 0.5, 'maxWs': 0.5, 'maxCs': 0.5}

    windows = test.get_weather_windows(olc)
    start_date_met = dt.datetime(2000, 1, 1)

    start_delay = test._get_start_delay(windows, start_date_met, test_input)

    assert start_delay == expected