def testSmoothPosdapMultiZigZag(self): tp = json.load(open("emission/tests/data/smoothing_data/caltrain_multi_zigzag.json")) (retained_indices, removed_indices) = tags.smooth_posdap(tp) logging.info("removed indices = %s" % removed_indices) self.assertEqual(len(removed_indices), 10) self.assertEqual(removed_indices, [21, 26, 27, 40, 41, 42, 43, 44, 45, 57])
def testSmoothPosdapOneZigZag(self): tp = json.load(open("emission/tests/data/smoothing_data/caltrain_one_zigzag.json")) (retained_indices, removed_indices) = tags.smooth_posdap(tp) logging.info("removed indices = %s" % removed_indices) self.assertEqual(len(removed_indices), 1) self.assertEqual(removed_indices, [68])