def test_multiple_containers_unchanged_still_deletes(self): processed = euf.process_file(self.loc_mult_containers_unchanged[0], self.loc_mult_containers_unchanged[1]) self.assertEqual( normalize(processed), normalize(self.lxml_mult_containers_unchanged_corrected))
def test_multiple_boxes_one_box_number(self): processed = euf.process_file(self.loc_box_unchanged[0], self.loc_box_unchanged[1]) self.assertEqual(normalize(processed), normalize(self.lxml_box_unchanged_corrected))
def test_multiple_containers_different_numbers(self): processed = euf.process_file(self.loc_box_changed[0], self.loc_box_changed[1]) self.assertEqual(processed, "")
def test_no_false_positives(self): processed = euf.process_file(self.loc_perfect[0], self.loc_perfect[1]) print(processed) self.assertEqual(normalize(processed), normalize(self.lxml_perfect))
def test_delete_blank_node(self): processed = euf.process_file(self.loc_empty[0], self.loc_empty[1]) self.assertEqual(normalize(processed), normalize(self.lxml_empty_corrected))
def test_append_odd_and_box_number_to_upper_neighbor(self): processed = euf.process_file(self.loc_odd_to_parent_node[0], self.loc_odd_to_parent_node[1]) self.assertEqual(normalize(processed), normalize(self.lxml_odd_to_parent_node_corrected))
def test_extent_only_append_to_upper_neighbor(self): processed = euf.process_file(self.loc_extent_to_parent_node[0], self.loc_extent_to_parent_node[1]) self.assertEqual(normalize(processed), normalize(self.lxml_extent_to_parent_node_corrected))
def test_failures_write_to_file(self): euf.process_file(self.loc_box_changed[0], self.loc_box_changed[1]) with open("problem_files.csv") as f: data = f.read() self.assertEquals(data.strip("\n"), self.problem_file_output.strip("\n"))
def test_multiple_containers_unchanged_still_deletes(self): processed = euf.process_file(self.loc_mult_containers_unchanged[0], self.loc_mult_containers_unchanged[1]) self.assertEqual(normalize(processed), normalize(self.lxml_mult_containers_unchanged_corrected))