'This can\'t really be tested as long as there isn\'t a way to
reset the logging setup ...'

def _test_python_error_logging(self):

    parse = self.etree.parse
    messages = []
    class Logger(self.etree.PyErrorLog, ):
        def log(self, entry, message, *args):
            messages.append(message)
    self.etree.use_global_python_log(Logger())
    f = BytesIO('<a><b></c></b></a>')
    try:
        parse(f)
    except SyntaxError:
        pass
    f.close()
    self.assertTrue([message for message in messages if ('mismatch' in message)])
    self.assertTrue([message for message in messages if (':PARSER:' in message)])
    self.assertTrue([message for message in messages if (':ERR_TAG_NAME_MISMATCH:' in message)])
    self.assertTrue([message for message in messages if (':1:15:' in message)])
