def test_sorting(self):
    logger = TestMetricLogger.create_logger()
    logger.add('train_accuracy', Step.from_iteration(5, 400), 0.9)
    logger.add('train_accuracy', Step.from_iteration(3, 400), 0.7)
    logger.add('train_accuracy', Step.from_iteration(4, 400), 0.8)
    self.assertEqual(logger.get_data('train_accuracy'), [(0, 0.5), (1, 0.6), (3, 0.7), (4, 0.8), (5, 0.9)])
def test_sorting(self):
    logger = TestMetricLogger.create_logger()
    logger.add('train_accuracy', Step.from_iteration(5, 400), 0.9)
    logger.add('train_accuracy', Step.from_iteration(3, 400), 0.7)
    logger.add('train_accuracy', Step.from_iteration(4, 400), 0.8)
    self.assertEqual(logger.get_data('train_accuracy'), [(0, 0.5), (1, 0.6), (3, 0.7), (4, 0.8), (5, 0.9)])