def test_remove_working_area(self): """ Tests that the working area is not considered among svg elements to use """ root = etree.Element("root") working_area = etree.SubElement(root, "svg", {"id": "wId"}) other_element = etree.SubElement(root, "path") extractor = PathsExtractor([working_area, other_element], to_mm, "wId") self.assertEqual(extractor.get_elements(), [other_element])
def test_get_elements(self): """ Tests that elements passed to the constructor are used """ root = etree.Element("root") element1 = etree.SubElement(root, "path") element2 = etree.SubElement(root, "rect") extractor = PathsExtractor([element1, element2], to_mm, "wId") self.assertEqual(extractor.get_elements(), [element1, element2])