Esempio n. 1
0
 def test_three_median_pivot_normal(self):
     l1 = [1, 2, 3, 4, 5, 6, 7]
     res = sort.three_median_pivot(l1)
     expect = 3
     self.assertEqual(res, expect,
                      "the pivot of %s is %s expected: %s" %
                      (l1, res, expect))
Esempio n. 2
0
 def test_three_median_pivot_normal(self):
     l1 = [1, 2, 3, 4, 5, 6, 7]
     res = sort.three_median_pivot(l1)
     expect = 3
     self.assertEqual(
         res, expect,
         "the pivot of %s is %s expected: %s" % (l1, res, expect))
Esempio n. 3
0
 def test_three_median_pivot_empty(self):
     l1 = []
     res = sort.three_median_pivot(l1)
     expect = None
     self.assertEqual(res, expect,
                      "the pivot of %s is %s expected: %s" %
                      (l1, res, expect))
Esempio n. 4
0
 def test_three_median_pivot_empty(self):
     l1 = []
     res = sort.three_median_pivot(l1)
     expect = None
     self.assertEqual(
         res, expect,
         "the pivot of %s is %s expected: %s" % (l1, res, expect))