def test_mergeAscendingOrder(self):
     self.assertTrue(
         equals(mergeAscendingOrder(ascending_list(), None),
                ascending_list()))
     self.assertTrue(
         equals(mergeAscendingOrder(None, ascending_list()),
                ascending_list()))
     self.assertTrue(
         equals(
             mergeAscendingOrder(another_ascending_list(),
                                 ascending_list()),
             combined_ascending_list()))
 def test_removeDuplicates(self):
     self.assertTrue(
         equals(removeDuplicates(duplicate_list()), non_duplicate_list()))
 def test_mergeSort(self):
     self.assertTrue(equals(mergeSort(descending_list()), ascending_list()))
 def test_middle(self):
     self.assertIsNone(middle(None))
     self.assertTrue(equals(middle(Node(24)), Node(24)))
     self.assertEqual(middle(ascending_list()).data, 40)
 def test_reverseRecursive(self):
     linked_list = reverseRecursive(ascending_list())
     self.assertTrue(equals(linked_list, descending_list()))
 def test_equals(self):
     self.assertTrue(equals(ascending_list(), ascending_list()))
     self.assertFalse(equals(ascending_list(), descending_list()))