示例#1
0
 def test_single(self):
     self.assertEqual(radix_sort([(1, 1)]), [(1, 1)])
示例#2
0
 def test_multiple_dupes(self):
     self.assertEqual(radix_sort([(1, 2), (2, 2), (1, 1), (1, 2), (0, 0)]),
                      [(0, 0), (1, 1), (1, 2), (1, 2), (2, 2)])
示例#3
0
 def test_empty(self):
     self.assertEqual(radix_sort([]), [])
示例#4
0
 def test_multiple_no_sort(self):
     self.assertEqual(radix_sort([(1, 1), (1, 2), (2, 2)]), [(1, 1), (1, 2),
                                                             (2, 2)])