Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/click/__pycache__/testing.cpython-37.pyc

155 lines
11 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>/<2F>]3<00>@s<>ddlZddlZddlZddlZddlZddlZddlmZmZm Z ej
e <0B> dd<02>dZ erlddlmZnddlZddlmZGdd<08>de<12>Zd d
<EFBFBD>ZGd d <0C>d e<12>ZGd d<0E>de<12>ZdS)<0F>N<>)<03> iteritems<6D>PY2<59> string_types<65>.)<01>StringIO)<01>_find_binary_readerc@sPeZdZdd<02>Zdd<04>Zdd<06>Zddd <09>Zdd
d <0B>Zd d <0A>Zdd<0F>Z dd<11>Z
dS)<15> EchoingStdincCs||_||_dS)N)<02>_input<75>_output)<03>self<6C>input<75>output<75>r<00>0/tmp/pip-install-c3kgu56x/click/click/testing.py<70>__init__szEchoingStdin.__init__cCs t|j|<01>S)N)<02>getattrr
)r <00>xrrr<00> __getattr__szEchoingStdin.__getattr__cCs|j<00>|<01>|S)N)r <00>write)r <00>rvrrr<00>_echo"s zEchoingStdin._echo<68><6F><EFBFBD><EFBFBD><EFBFBD>cCs|<00>|j<01>|<01><01>S)N)rr
<00>read)r <00>nrrrr&szEchoingStdin.readcCs|<00>|j<01>|<01><01>S)N)rr
<00>readline)r rrrrr)szEchoingStdin.readlinecs<00>fdd<02><08>j<00><01>D<00>S)Ncsg|]}<01><00>|<01><01>qSr)r)<02>.0r)r rr<00>
<listcomp>-sz*EchoingStdin.readlines.<locals>.<listcomp>)r
<00> readlines)r r)r rr,szEchoingStdin.readlinescst<00>fdd<02><08>jD<00><01>S)Nc3s|]}<01><00>|<01>VqdS)N)r)rr)r rr<00> <genexpr>0sz(EchoingStdin.__iter__.<locals>.<genexpr>)<02>iterr
)r r)r r<00>__iter__/szEchoingStdin.__iter__cCs
t|j<01>S)N)<02>reprr
)r rrr<00>__repr__2szEchoingStdin.__repr__N)r)r) <0B>__name__<5F>
__module__<EFBFBD> __qualname__rrrrrrr!r#rrrrr s

r cCsft|d<01>r.tr|St|<00>}|dk r&|Std<02><01>|dkr<d}nt|t<05>sP|<00>|<01>}tr\t|<00>St<08> |<00>S)Nrz.Could not find binary reader for input stream.<2E>)
<EFBFBD>hasattrrr<00> TypeError<6F>
isinstance<EFBFBD>bytes<65>encoder<00>io<69>BytesIO)r <00>charsetrrrr<00>make_input_stream6s


r0c@sFeZdZdZd dd<04>Zedd<06><00>Zedd<08><00>Zed d
<EFBFBD><00>Zd d <0C>Z dS)<0E>Resultz3Holds the captured result of an invoked CLI script.NcCs(||_||_||_||_||_||_dS)N)<06>runner<65> stdout_bytes<65> stderr_bytes<65> exit_code<64> exception<6F>exc_info)r r2r3r4r5r6r7rrrrLs zResult.__init__cCs|jS)z(The (standard) output as unicode string.)<01>stdout)r rrrr[sz Result.outputcCs|j<00>|jjd<01><02>dd<03>S)z&The standard output as unicode string.<2E>replacez
<EFBFBD>
)r3<00>decoder2r/r9)r rrrr8`sz Result.stdoutcCs(|jstd<01><01>|j<00>|jjd<02><02>dd<04>S)z%The standard error as unicode string.zstderr not separately capturedr9z
r:)r4<00>
ValueErrorr;r2r/r9)r rrr<00>stderrfsz Result.stderrcCs"dt|<00>j|jrt|j<02>pdfS)Nz<%s %s><3E>okay)<04>typer$r6r")r rrrr#oszResult.__repr__)N)
r$r%r&<00>__doc__r<00>propertyrr8r=r#rrrrr1Is 
   r1c@sTeZdZdZddd<06>Zdd<08>Zdd d
<EFBFBD>Zejdd d <0C><01>Z dd d<0E>Z
ejdd<10><00>Z dS)<15> CliRunnera<72>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. This is
UTF-8 by default and should not be changed currently as
the reporting to Click only works in Python 2 properly.
: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
NFTcCs,|dkr d}||_|pi|_||_||_dS)Nzutf-8)r/<00>env<6E>
echo_stdin<EFBFBD>
mix_stderr)r r/rCrDrErrrr<00>s 
zCliRunner.__init__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.
<20>root)<01>name)r <00>clirrr<00>get_default_prog_name<6D>szCliRunner.get_default_prog_namecCst|j<01>}|r|<02>|<01>|S)z8Returns the environment overrides for invoking a script.)<03>dictrC<00>update)r Z overridesrrrr<00>make_env<6E>s

zCliRunner.make_envc#sbt<00>|j<01><02>tj}tj}tj}tjj}dtj_|<00> |<02>}t
rlt <0B>}|j rRt <0A>|<08><02>|t_|js<>t <0B>} | t_nZt<0F><10>}|j r<>t <0A>|<08><02>tj<11>|jd<02><02>tj||jd<02>t_|js<>t<0F><10>} tj| |jd<02>t_|jr<>tjt_<05>t_d <0C>fdd<05> }
d <0A>fdd<07> } dd <09>} |<03>d<0E>fd
d <0B> } tjj}tjj}tjj}tjj}|
tj_| tj_| tj_| tj_i}zzx`t|<02>D]T\}}tj<1A>|<13>||<|dk<08>r<>y tj|=Wntk
<EFBFBD>r<>YnXn
|tj|<<00>q`W||j <00>o<>| fVWdxPt|<12>D]D\}}|dk<08>ry tj|=Wntk
<EFBFBD>rYnXn
|tj|<<00>q<>W|t_|t_|t_|tj_|tj_|tj_|tj_|tj_XdS)a<>A 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.
.. versionadded:: 4.0
The ``color`` parameter was added.
: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.
<20>P)<01>encodingNcs<tj<01>|p d<01><00><00><03><00>d<02>}tj<01>|d<00>tj<01><05>|S)N<>z
r:)<06>sysr8rr<00>rstrip<69>flush)<02>prompt<70>val)r rr<00> visible_input<75>s

z*CliRunner.isolation.<locals>.visible_inputcs,tj<01>|p dd<00>tj<01><03><00><00><04><00>d<03>S)NrOr:z
)rPr8rrRrrQ)rS)r rr<00> hidden_input<75>s
z)CliRunner.isolation.<locals>.hidden_inputcSs*tj<01>d<01>}|r&tj<03>|<01>tj<03><05>|S)Nr)rP<00>stdinrr8rrR)Zecho<68>charrrr<00>_getchar<61>s
  
z%CliRunner.isolation.<locals>._getcharcs|dkr<0E> S| S)Nr)<02>stream<61>color)<01> default_colorrr<00>should_strip_ansi<73>sz.CliRunner.isolation.<locals>.should_strip_ansi)N)N)NN)r0r/rPrWr8r=<00>clickpkgZ
formattingZ FORCED_WIDTHrLrrrDr rEr-r.<00> TextIOWrapperZtermuiZvisible_prompt_funcZhidden_prompt_funcrY<00>utilsr]r<00>os<6F>environ<6F>get<65> Exception)r r rCr[Z old_stdinZ
old_stdoutZ
old_stderrZold_forced_widthZ bytes_outputZ bytes_errorrUrVrYr]Zold_visible_prompt_funcZold_hidden_prompt_funcZold__getchar_funcZold_should_strip_ansiZold_env<6E>key<65>valuer)r\r r<00> isolation<6F>s<> 



 
 zCliRunner.isolationc Ks<>d} |j|||d<02><03><01>P}
d} d} t|t<02>r4t<03>|<02>}y|<08>d<04>} Wntk
r`|<00>|<01>} YnXz<>y|jf|prd| d<06>|<08><02>Wn<>t k
r<EFBFBD>}zTt
<EFBFBD> <0B>} |j } | dkr<>d} | dkr<>|} t| t <0A>s<>t
j<0E>t| <0C><01>t
j<0E>d<07>d} Wdd}~XYn<tk
<EFBFBD>r.}z|<05>s<0E>|} d} t
<EFBFBD> <0B>} Wdd}~XYnXWdt
j<0E><12>|
d<00><13>}|
d<00>o^|
d<00><13>}XWdQRXt|||| | | d <09>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.
.. versionadded:: 3.0
The ``catch_exceptions`` parameter was added.
.. versionchanged:: 3.0
The result object now has an `exc_info` attribute with the
traceback if available.
.. versionadded:: 4.0
The ``color`` parameter was added.
: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.
N)r rCr[r<00> prog_namer)<02>argsrhr:r)r2r3r4r5r6r7)rgr*r<00>shlex<65>split<69>pop<6F>KeyErrorrI<00>main<69>
SystemExitrPr7<00>code<64>intr8r<00>strrdrR<00>getvaluer1)r rHrir rCZcatch_exceptionsr[rE<00>extrar7Z
outstreamsr6r5rh<00>er8r=rrr<00>invokesL 


 
 "zCliRunner.invokeccs^t<00><01>}t<02><03>}t<00>|<02>z
|VWdt<00>|<01>yt<05>|<02>Wnttfk
rVYnXXdS)z<>A context manager that creates a temporary folder and changes
the current working directory to it for isolated filesystem tests.
N) ra<00>getcwd<77>tempfile<6C>mkdtemp<6D>chdir<69>shutil<69>rmtree<65>OSError<6F>IOError)r <00>cwd<77>trrr<00>isolated_filesystemgs


zCliRunner.isolated_filesystem)NNFT)N)NNF)NNNTFF) r$r%r&r@rrIrL<00>
contextlib<EFBFBD>contextmanagerrgrvr<>rrrrrBvs

 u
NrB)rarPr{rxr<>rj<00>_compatrrr<00>modulesr$<00>rsplitr^<00> cStringIOrr-r<00>objectr r0r1rBrrrr<00><module>s -