':type command: str
:type test: str
:type python_version: str | None
:type messages: list[TestMessage] | None
:type summary: str | None'

def __init__(self, command, test, python_version=None, messages=None, summary=None):

    super(TestFailure, self).__init__(command, test, python_version)
    if messages:
        messages = sorted(messages, key=(lambda m: m.sort_key))
    self.messages = (messages or [])
    self.summary = summary
