Beispiel #1
0
 def testMSortFloatList(self):
     self.assertEqual(hw.msort([3.5, 3.0, 3.75]), [3.0, 3.5, 3.75])
Beispiel #2
0
 def testMSortAlreadySorted(self):
     self.assertEqual(hw.msort([0, 1, 2, 3]), [0, 1, 2, 3])
Beispiel #3
0
 def testMSortIntList(self):
     self.assertEqual(hw.msort([3, 1, 7, 0, 2]), [0, 1, 2, 3, 7])
Beispiel #4
0
 def testMSortEmptyList(self):
     self.assertEqual(hw.msort([]), [])
Beispiel #5
0
 def testMSortSingleElement(self):
     self.assertEqual(hw.msort([0]), [0])
 def testMSortFloatList(self):
     self.assertEqual(hw.msort([3.5,3.0,3.75]), [3.0,3.5,3.75])
 def testMSortIntList(self):
     self.assertEqual(hw.msort([3,1,7,0,2]), [0,1,2,3,7])
 def testMSortAlreadySorted(self):
     self.assertEqual(hw.msort([0,1,2,3]), [0,1,2,3])
 def testMSortSingleElement(self):
     self.assertEqual(hw.msort([0]), [0]) 
 def testMSortEmptyList(self):
     self.assertEqual(hw.msort([]), [])