def test_with_relative_and_absolute_time_info(self): """If a relative time offset is given as well as an absolute timespan, expect an error!""" with pytest.raises(ValueError): helpers.parse_time_range('-30 2014-01-05 18:15 - 2014-04-01 05:19')
def test_various_time_infos(self, time_info, expectation): """Make sure that our parser works according to our expectations.""" assert helpers.parse_time_range(time_info) == expectation