def METHOD_NAME(t1, t2, expectedMsg):
    with pytest.raises(InvalidInput) as excinfo:
    # Check correct exception type
        get_time_series_data(tmin=t1, tmax=t2)
    # Check correct exception message
    assert expectedMsg in str(excinfo.value)