def test_get_timepoint(self, timepoints): colony = Colony(1, timepoints) # Get timepoint assert colony.get_timepoint( timepoints[0].date_time) == timepoints[0] with pytest.raises(ValueError): colony.get_timepoint(None)
def test_get_timepoint(self, timepoints): colony = Colony(1, timepoints) assert colony.get_timepoint( timepoints[0].timestamp) == timepoints[0] assert colony.get_timepoint(timedelta(seconds=-1)) is None