def test_sort_duration_events_in_order(self):
        """
        Test that we're sorting the duration_event timestamps
        (added in chronological order) correctly
        """
        for key, events in self.events.items():
            stats = PBSVideoStats()
            for event in events:
                stats.add_event(event)

            stats._calculate_duration()
            results = stats.duration_events
            for count, edata in enumerate(results):
                if len(results) < count + 1:
                    self.assertTrue(
                        edata.get('edate') <= results[count + 1].get('edate'))
dataset/ETHPy150Open pbs/agora-proc/tests/test_stats.py/PBSVideoStatsTestcase.test_sort_duration_events_in_order/swapped operands of `<`