def test_get_xml_parser(self): # Check to see if the correct lxml.etree.ETCompactXMLParser object is returned by the function `get_xml_parser` self.assertEqual(type(xml.get_xml_parser()), ET.ETCompatXMLParser)
def test_set_xml_parser(self): # Check to see if a new parser can be set by the function `set_xml_parser` parser = ET.ETCompatXMLParser() xml.set_xml_parser(parser) self.assertTrue(parser is xml.get_xml_parser())
def setUpClass(cls): cls.xml_parser = xml.get_xml_parser()