Example #1
0
    def test_one_odd_node(self):
        node = Node(3)
        one_odd_list = LinkedList()
        one_odd_list.add_node(node)
        one_odd_list.remove_odds()

        "it should produce and empty list has only one node, which is odd"
        self.assertTrue(one_odd_list.is_empty())
Example #2
0
 def test_empty_list(self):
     empty_list = LinkedList()
     empty_list.remove_odds()
     self.assertTrue(empty_list.is_empty())