##### SUMMARY

Move the remaining files needed by `ansible-test` into the `test/lib/ansible_test/` directory. This is required to implement: https://github.com/ansible/ansible/issues/59884

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

"""General application error."""
class ApplicationWarning(Exception):
    """General application warning which interrupts normal program flow."""
class SubprocessError(ApplicationError):
    """Error resulting from failed subprocess execution."""
    def __init__(self, cmd, status=0, stdout=None, stderr=None, runtime=None):
        """
        :type cmd: list[str]
        :type status: int
        :type stdout: str | None
        :type stderr: str | None
        :type runtime: float | None
        """
        message = 'Command "%s" returned exit status %s.\n' % (' '.join(cmd_quote(c) for c in cmd), status)
        if stderr:
            message += '>>> Standard Error\n'
            message += '%s%s\n' % (stderr.strip(), Display.clear)
        if stdout:
            message += '>>> Standard Output\n'
            message += '%s%s\n' % (stdout.strip(), Display.clear)
        message = message.strip()
        super(SubprocessError, self).__init__(message)
        self.cmd = cmd
        self.status = status
        self.stdout = stdout
        self.stderr = stderr
        self.runtime = runtime
class MissingEnvironmentVariable(ApplicationError):
    """Error caused by missing environment variable."""
    def __init__(self, name):