Ejemplo n.º 1
0
def stop():
    bus_estimation_accessor.stop()
    busway_info_fetcher.stop()
    train_info_fetcher.stop()
    walk_info_fetcher.stop()
    busway_transfer_fetcher.stop()
    busway_track_fetcher.stop()
    autocomplete_service.stop()
Ejemplo n.º 2
0
 def test_bus_estimate_accessor(self):
     bus_estimation_accessor.reset()
     bus_estimation_accessor.start()
     bus_estimation_accessor.add_sample('jalan1', 'jalan2', 90)
     real_value = bus_estimation_accessor.predict_eta('jalan1', 'jalan2')
     self.assertEqual(real_value, 90)
     bus_estimation_accessor.add_sample('jalan1', 'jalan2', 10)
     real_value = bus_estimation_accessor.predict_eta('jalan1', 'jalan2')
     self.assertEqual(real_value, 50)
     bus_estimation_accessor.stop()