INNER CODE UNIT · Python
cleanup
usnistgov/OSCAL · src/specifications/profile-resolution/spec-tester.py:155
def cleanup(self):
"""Delete temporary directory"""
self.logger.debug(
f"Removing temporary output directory '{self.out_directory}'")
shutil.rmtree(self.out_directory)
def compare_elements(e1: Optional[ET.ElementTree], e2: Optional[ET.ElementTree], path=".",
e1Name="left", e2Name="right") -> Tuple[bool, List[str]]:
"""
Compare two element trees returning if they are the same, and a list of changes in the form of
XPath-like selections.
Warning: This comparison function will likely fail on mixed content (e.g. markup) and in cases
where the order of child elements is different.
Note: comments added to some difference paths using XPath 2.0 (: comment syntax :)
"""