Exemplo n.º 1
0
 def test_mergesort_single(self):
     sortedList = sortUrls.mergesort(self.singleUrl).sort()
     self.assertEquals(sortedList, self.singleUrl)
Exemplo n.º 2
0
 def test_mergesort(self):
     sortedList = sortUrls.mergesort(self.urls).sort()
     self.assertEquals(sortedList, self.sortedByLength)
Exemplo n.º 3
0
 def test_mergesort_empty(self):
     sortedList = sortUrls.mergesort(self.emptyUrls).sort()
     self.assertEquals(sortedList, self.emptyUrls)
Exemplo n.º 4
0
 def test_mergesort(self):
     sortedList = sortUrls.mergesort(self.urls, length).sort()
     self.assertEquals(sortedList, self.sortedByLength)
     
     sortedList = sortUrls.mergesort(self.urls, alpha).sort()
     self.assertEquals(sortedList, self.sortedByAlphabetical)