def test(self): l = ['E0501', 'E0503', 'F0002', 'I0201', 'W0540', 'R0202', 'F0203', 'R0220', 'W0321', 'I0001'] self.assertEqual(sort_msgs(l), ['E0501', 'E0503', 'W0321', 'W0540', 'R0202', 'R0220', 'I0001', 'I0201', 'F0002', 'F0203',])
def test(self): l = ["E0501", "E0503", "F0002", "I0201", "W0540", "R0202", "F0203", "R0220", "W0321", "I0001"] self.assertEquals( sort_msgs(l), ["E0501", "E0503", "W0321", "W0540", "R0202", "R0220", "I0001", "I0201", "F0002", "F0203"] )