Ejemplo n.º 1
0
    def testFindSplit(self):
        # Find split returns the first index of the segment after the split.
        self.assertEqual(3, find_change_points._FindSplit([3, 2, 3, 5, 6, 5]))

        # If there are several splits that are equally interesting, or no
        # interesting splits, then the first one is returned.
        self.assertEqual(2, find_change_points._FindSplit([2, 2, 4, 4, 6, 6]))
        self.assertEqual(1, find_change_points._FindSplit([4, 4, 4, 4, 4, 4]))
  def testFindSplit(self):
    # Find split returns the first index of the segment after the split.
    self.assertEqual(3, find_change_points._FindSplit([3, 2, 3, 5, 6, 5]))

    # If there are several splits that are equally interesting, or no
    # interesting splits, then the first one is returned.
    self.assertEqual(2, find_change_points._FindSplit([2, 2, 4, 4, 6, 6]))
    self.assertEqual(1, find_change_points._FindSplit([4, 4, 4, 4, 4, 4]))