def testLimitSortedStopTooFarFromParentStation(self):
    """Sort by decreasing distance, keeping the N greatest."""
    self.problems = self.CreateLimitPerTypeProblemReporter(3)
    self.accumulator = self.problems.GetAccumulator()
    for i, distance in enumerate((1000, 3002.0, 1500, 2434.1, 5023.21)):
      self.problems.StopTooFarFromParentStation(
          "s%d" % i, "S %d" % i, "p%d" % i, i % "P %d", distance)
    self.assertEquals(5, self.accumulator.WarningCount())
    self.assertEquals(0, self.accumulator.ErrorCount())
    self.assertProblemsAttribute(transitfeed.TYPE_WARNING,
        "StopTooFarFromParentStation", "stop_id", "s4 s1 s3")
dataset/ETHPy150Open google/transitfeed/tests/testfeedvalidator.py/LimitPerTypeProblemReporterTestCase.testLimitSortedStopTooFarFromParentStation/swapped operands of `%`