def test_hypo_events_count_simple_df(self): self.simple_df[GLUCOSE] = [1, 1, 3, 2, 2] index = indices.GVhypo_events_count(df=self.simple_df, calc_config=self.mock_5_mg_config) self.assertEqual(index.calculate(threshold=3, threshold_duration=10), 2)
def test_hypo_events_count_threshold_duration_not_int(self): index = indices.GVhypo_events_count(df=self.simple_df, calc_config=self.mock_5_mg_config) with self.assertRaises(ValueError): index.calculate(threshold=0, threshold_duration="test")