403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/_pytest/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/_pytest/__pycache__/legacypath.cpython-39.pyc
a

05d!B�@s�dZddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	l
mZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl m"Z"ddl m#Z#ddl$m%Z%ddl$m&Z&ddl$m'Z'ddl(m)Z)ddl*m+Z+e	�rnddl,m-Z-ddl.Z.eGdd�d��Z/Gd d!�d!�Z0eej1Gd"d#�d#���Z2Gd$d%�d%�Z3ee4ed&�d'd(�Z5eed)�d*d+�Z6e)ed)�d,d-�Z7eed)�d.d/�Z8eed)�d0d1�Z9eeed)�d2d3�Z:eed)�d4d5�Z;e4e4e
e4ee4fd6�d7d8�Z<e#ed)�d9d:�Z=e#edd;�d<d=�Z>ed>d?�edd@�dAdB��Z?eeddC�dDdE��Z@eeAeddF�dGdH��ZBdS)Iz?Add backward compatibility support for the legacy py path type.�N)�Path)�List)�Optional)�
TYPE_CHECKING)�Union)�SectionWrapper)�Cache)�final)�LEGACY_PATH��legacy_path)�Config)�hookimpl)�PytestPluginManager)�check_ispytest)�fixture)�FixtureRequest)�Session)�MonkeyPatch)�	Collector)�Item)�Node)�HookRecorder)�Pytester)�	RunResult)�TerminalReporter)�TempPathFactory)�Finalc@s�eZdZUdZdZejZded<ejZded<dd�ee	dd�d	d
�Z
eed�dd
��Z
eed�dd��Zedd��Zedd��Zejdd��Zeed�dd��Zed�dd�Zdd�dd�Zdd�dd�Zed�dd�Zed�dd �Zed�d!d"�Zeed#�d$d%�Zed�d&d'�Zed�d(d)�Zed�d*d+�Z dqdd�d,d-�Z!ed�d.d/�Z"ed�d0d1�Z#dred�d2d3�Z$e%e&e'e(e)fd4�d5d6�Z*d7d8�Z+e,e'e(e)fe,e(d9�d:d;�Z-d<d=�Z.d>d?�Z/d@dA�Z0dBddC�e	dD�dEdF�Z1e2d�dGdH�Z3e2d�dIdJ�Z4e%d�dKdL�Z5e%d�dMdN�Z6dsdPdQ�Z7dRdS�Z8dtdTdU�Z9e)ee&e'e(e)fdV�dWdX�Z:e;j<e;j<efdYdZ�Z=ded[�e2d�d\d]�Z>e2d�d^d_�Z?d`da�Z@ddb�e2d�dcdd�ZAdueeBdfdg�dhdi�ZCdveeBdfdj�dkdl�ZDed�dmdn�ZEed�dodp�ZFdS)w�Testdirz�
    Similar to :class:`Pytester`, but this class works with legacy legacy_path objects instead.

    All methods just forward to an internal :class:`Pytester` instance, converting results
    to `legacy_path` objects as necessary.
    Fr�CLOSE_STDIN�TimeoutExpired��	_ispytestN)�pytesterr"�returncCst|�||_dS�N)r�	_pytester)�selfr#r"�r(�6/usr/lib/python3.9/site-packages/_pytest/legacypath.py�__init__6szTestdir.__init__�r$cCst|jj�S)z-Temporary directory where tests are executed.)rr&�path�r'r(r(r)�tmpdir:szTestdir.tmpdircCst|jj�Sr%)rr&Z
_test_tmprootr-r(r(r)�test_tmproot?szTestdir.test_tmprootcCs|jjSr%)r&Z_requestr-r(r(r)�requestCszTestdir.requestcCs|jjSr%�r&�pluginsr-r(r(r)r2GszTestdir.pluginscCs||j_dSr%r1)r'r2r(r(r)r2KscCs|jjSr%)r&Z_monkeypatchr-r(r(r)�monkeypatchOszTestdir.monkeypatchcCs|j�|�S)z(See :meth:`Pytester.make_hook_recorder`.)r&�make_hook_recorder)r'�
pluginmanagerr(r(r)r4SszTestdir.make_hook_recordercCs
|j��S)zSee :meth:`Pytester.chdir`.)r&�chdirr-r(r(r)r6Wsz
Testdir.chdircCs
|j��S)zSee :meth:`Pytester._finalize`.)r&Z	_finalizer-r(r(r)�finalize[szTestdir.finalizecOs4|r|�d�sd|}t|jj|g|�Ri|���S)zSee :meth:`Pytester.makefile`.�.)�
startswithrr&�makefile)r'�ext�args�kwargsr(r(r)r:_szTestdir.makefilecCst|j�|��S)z"See :meth:`Pytester.makeconftest`.)rr&�makeconftest�r'�sourcer(r(r)r>kszTestdir.makeconftestcCst|j�|��S)zSee :meth:`Pytester.makeini`.)rr&�makeinir?r(r(r)rAoszTestdir.makeini)r@r$cCs|j�|�S)zSee :meth:`Pytester.getinicfg`.)r&�	getinicfgr?r(r(r)rBsszTestdir.getinicfgcCst|j�|��S)z'See :meth:`Pytester.makepyprojecttoml`.)rr&�makepyprojecttomlr?r(r(r)rCwszTestdir.makepyprojecttomlcOst|jj|i|���S)z See :meth:`Pytester.makepyfile`.)rr&�
makepyfile�r'r<r=r(r(r)rD{szTestdir.makepyfilecOst|jj|i|���S)z!See :meth:`Pytester.maketxtfile`.)rr&�maketxtfilerEr(r(r)rFszTestdir.maketxtfilecCs|j�|�S)z#See :meth:`Pytester.syspathinsert`.)r&�
syspathinsert�r'r,r(r(r)rG�szTestdir.syspathinsertcCst|j�|��S)zSee :meth:`Pytester.mkdir`.)rr&�mkdir�r'�namer(r(r)rI�sz
Testdir.mkdircCst|j�|��S)zSee :meth:`Pytester.mkpydir`.)rr&�mkpydirrJr(r(r)rL�szTestdir.mkpydircCst|j�|��S)z"See :meth:`Pytester.copy_example`.)rr&�copy_examplerJr(r(r)rM�szTestdir.copy_example��configr$cCs|j�||�S)zSee :meth:`Pytester.getnode`.)r&�getnode)r'rO�argr(r(r)rP�szTestdir.getnodecCs|j�|�S)z!See :meth:`Pytester.getpathnode`.)r&�getpathnoderHr(r(r)rR�szTestdir.getpathnode)�colitemsr$cCs|j�|�S)zSee :meth:`Pytester.genitems`.)r&�genitems)r'rSr(r(r)rT�szTestdir.genitemscCs|j�|�S)zSee :meth:`Pytester.runitem`.)r&�runitemr?r(r(r)rU�szTestdir.runitemcGs|jj|g|�R�S)z&See :meth:`Pytester.inline_runsource`.)r&�inline_runsource)r'r@Zcmdlineargsr(r(r)rV�szTestdir.inline_runsourcecGs|jj|�S)z%See :meth:`Pytester.inline_genitems`.)r&�inline_genitems�r'r<r(r(r)rW�szTestdir.inline_genitemsr(�r2�no_reraise_ctrlc)rZcGs|jj|||d��S)z See :meth:`Pytester.inline_run`.rY)r&�
inline_run)r'r2rZr<r(r(r)r[�s�zTestdir.inline_runcOs|jj|i|��S)z)See :meth:`Pytester.runpytest_inprocess`.)r&�runpytest_inprocessrEr(r(r)r\�szTestdir.runpytest_inprocesscOs|jj|i|��S)zSee :meth:`Pytester.runpytest`.)r&�	runpytestrEr(r(r)r]�szTestdir.runpytestcGs|jj|�S)z!See :meth:`Pytester.parseconfig`.)r&�parseconfigrXr(r(r)r^�szTestdir.parseconfigcGs|jj|�S)z$See :meth:`Pytester.parseconfigure`.)r&�parseconfigurerXr(r(r)r_�szTestdir.parseconfigure�	test_funccCs|j�||�S)zSee :meth:`Pytester.getitem`.)r&�getitem)r'r@�funcnamer(r(r)ra�szTestdir.getitemcCs|j�|�S)zSee :meth:`Pytester.getitems`.)r&�getitemsr?r(r(r)rc�szTestdir.getitemscCs|jj|||d�S)z"See :meth:`Pytester.getmodulecol`.)�
configargs�withinit)r&�getmodulecol)r'r@rdrer(r(r)rf�s�zTestdir.getmodulecol)�modcolrKr$cCs|j�||�S)z%See :meth:`Pytester.collect_by_name`.)r&�collect_by_name)r'rgrKr(r(r)rh�szTestdir.collect_by_namecKs|jj||||fi|��S)zSee :meth:`Pytester.popen`.)r&�popen)r'�cmdargs�stdout�stderr�stdin�kwr(r(r)ri�s	z
Testdir.popen��timeoutrmcGs|jj|||d��S)zSee :meth:`Pytester.run`.ro)r&�run)r'rprmrjr(r(r)rq�szTestdir.runcCs|j�|�S)zSee :meth:`Pytester.runpython`.)r&�	runpython)r'Zscriptr(r(r)rr�szTestdir.runpythoncCs|j�|�S)z!See :meth:`Pytester.runpython_c`.)r&�runpython_c)r'Zcommandr(r(r)rs�szTestdir.runpython_c)rpcGs|jj|d|i�S)z*See :meth:`Pytester.runpytest_subprocess`.rp)r&�runpytest_subprocess)r'rpr<r(r(r)rt�szTestdir.runpytest_subprocess�$@z
pexpect.spawn)�string�expect_timeoutr$cCs|jj||d�S)z"See :meth:`Pytester.spawn_pytest`.�rw)r&�spawn_pytest)r'rvrwr(r(r)ry�szTestdir.spawn_pytest)�cmdrwr$cCs|jj||d�S)zSee :meth:`Pytester.spawn`.rx)r&�spawn)r'rzrwr(r(r)r{�sz
Testdir.spawncCsd|j�d�S)Nz	<Testdir �>)r.r-r(r(r)�__repr__�szTestdir.__repr__cCs
t|j�Sr%)�strr.r-r(r(r)�__str__�szTestdir.__str__)N)N)r`)r(F)ru)ru)G�__name__�
__module__�__qualname__�__doc__Z__test__rr�__annotations__r �boolr*�propertyr
r.r/r0r2�setterrr3rr4r6r7r:r>rAr~rrBrCrDrFrGrIrLrMr
rrrrrPrRrrTrUrVrWr[rr\r]r^r_rarcrfrh�
subprocess�PIPErirqrrrsrt�floatryr{r}rr(r(r(r)r(s�



 

�	�
��rc@s$eZdZeeeed�dd���ZdS)�LegacyTestdirPlugin)r#r$cCst|dd�S)z�
        Identical to :fixture:`pytester`, and provides an instance whose methods return
        legacy ``LEGACY_PATH`` objects instead when applicable.

        New code should avoid using :fixture:`testdir` in favor of :fixture:`pytester`.
        Tr!)r)r#r(r(r)�testdirs	zLegacyTestdirPlugin.testdirN)r�r�r��staticmethodrrrr�r(r(r(r)r�sr�c@sTeZdZUdZeed<dd�eedd�dd�Zdeee	d
�dd�Z
e	d
�dd�ZdS)�TempdirFactoryaBackward compatibility wrapper that implements :class:`py.path.local`
    for :class:`TempPathFactory`.

    .. note::
        These days, it is preferred to use ``tmp_path_factory``.

        :ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.

    �_tmppath_factoryFr!N)�tmppath_factoryr"r$cCst|�||_dSr%)rr�)r'r�r"r(r(r)r*szTempdirFactory.__init__T)�basename�numberedr$cCst|j�||����S)zTSame as :meth:`TempPathFactory.mktemp`, but returns a :class:`py.path.local` object.)rr��mktemp�resolve)r'r�r�r(r(r)r�#szTempdirFactory.mktempr+cCst|j�����S)zYSame as :meth:`TempPathFactory.getbasetemp`, but returns a :class:`py.path.local` object.)rr��getbasetempr�r-r(r(r)r�'szTempdirFactory.getbasetemp)T)r�r�r�r�rr�r�r*r~r
r�r�r(r(r(r)r�s

��r�c@sBeZdZeedd�eed�dd���Zeeee	d�dd���Z
d	S)
�LegacyTmpdirPluginZsession)Zscope)r0r$cCs|jjS)zFReturn a :class:`pytest.TempdirFactory` instance for the test session.)rO�_tmpdirhandler)r0r(r(r)�tmpdir_factory-sz!LegacyTmpdirPlugin.tmpdir_factory)�tmp_pathr$cCst|�S)a�Return a temporary directory path object which is unique to each test
        function invocation, created as a sub directory of the base temporary
        directory.

        By default, a new base temporary directory is created each test session,
        and old bases are removed after 3 sessions, to aid in debugging. If
        ``--basetemp`` is used then it is cleared each session. See :ref:`base
        temporary directory`.

        The returned object is a `legacy_path`_ object.

        .. note::
            These days, it is preferred to use ``tmp_path``.

            :ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.

        .. _legacy_path: https://py.readthedocs.io/en/latest/path.html
        r)r�r(r(r)r.4szLegacyTmpdirPlugin.tmpdirN)r�r�r�r�rrr�r�rr
r.r(r(r(r)r�,sr�)r'rKr$cCst|�|��S)z{Return a directory path object with the given name.

    Same as :func:`mkdir`, but returns a legacy py path instance.
    )rrIrJr(r(r)�
Cache_makedirLsr�)r'r$cCs
t|j�S)zO(deprecated) The file system path of the test module which collected this test.�rr,r-r(r(r)�FixtureRequest_fspathTsr�cCs
t|j�S)z�The directory from which pytest was invoked.

    Prefer to use ``startpath`` which is a :class:`pathlib.Path`.

    :type: LEGACY_PATH
    �rZ	startpathr-r(r(r)�TerminalReporter_startdirYsr�cCstt|jj��S)z�The directory from which pytest was invoked.

    Prefer to use :attr:`invocation_params.dir <InvocationParams.dir>`,
    which is a :class:`pathlib.Path`.

    :type: LEGACY_PATH
    )rr~Zinvocation_params�dirr-r(r(r)�Config_invocation_dircsr�cCstt|j��S)z�The path to the :ref:`rootdir <rootdir>`.

    Prefer to use :attr:`rootpath`, which is a :class:`pathlib.Path`.

    :type: LEGACY_PATH
    )rr~Zrootpathr-r(r(r)�Config_rootdirnsr�cCs|jrtt|j��SdS)z�The path to the :ref:`configfile <configfiles>`.

    Prefer to use :attr:`inipath`, which is a :class:`pathlib.Path`.

    :type: Optional[LEGACY_PATH]
    N)�inipathrr~r-r(r(r)�Config_inifilexsr�cCs
t|j�S)z�The path from which pytest was invoked.

    Prefer to use ``startpath`` which is a :class:`pathlib.Path`.

    :type: LEGACY_PATH
    r�r-r(r(r)�Session_stardir�sr�)rK�type�valuecs\|dkrH|jdusJ�|jj�t|t�r2t�|�n|}�fdd�|D�Std|��|��dS)NZpathlistcsg|]}tt�|���qSr()rr~)�.0�x�Zdpr(r)�
<listcomp>��z/Config__getini_unknown_type.<locals>.<listcomp>zunknown configuration type: )r��parent�
isinstancer~�shlex�split�
ValueError)r'rKr�r�Zinput_valuesr(r�r)�Config__getini_unknown_type�sr�cCs
t|j�S)z4(deprecated) returns a legacy_path copy of self.pathr�r-r(r(r)�Node_fspath�sr�)r'r�r$cCst|�|_dSr%)rr,)r'r�r(r(r)�Node_fspath_set�sr�T)Ztryfirst)�early_configr$cCs�t�}|�|j�|jtdtdd�|jtdtt�dd�|jt	dtt
�dd�|jtdtt�dd�|jtdtt
�dd�|jtdtt�dd�|jtdtt�dd�|�td	t�|jtdttt�dd�d
S)zLMonkeypatch legacy path attributes in several classes, as early as possible.ZmakedirF�Zraising�fspathZstartdirZinvocation_dirZrootdirZinifileZ_getini_unknown_typeN)r�add_cleanup�undo�setattrrr�rr�r�rr�r
r�r�r�rr�r�rr�r�)r��mpr(r(r)�pytest_load_initial_conftests�s�r�rNcCsl|j�d�rht�}|�|j�z
|j}Wnty:Yn 0t|dd�}|j|d|dd�|j�	t
d�dS)	zKInstalls the LegacyTmpdirPlugin if the ``tmpdir`` plugin is also installed.r.Tr!r�Fr�zlegacypath-tmpdirN)r5Z
has_pluginrr�r�Z_tmp_path_factory�AttributeErrorr�r��registerr�)rOr�Ztmp_path_factoryr�r(r(r)�pytest_configure�s
r�)�plugin�managerr$cCs,||�d�u}|r(|�t�s(|�td�dS)Nr#zlegacypath-pytester)Z
get_pluginZ
is_registeredr�r�)r�r�Zis_pytesterr(r(r)�pytest_plugin_registered�sr�)Cr�Zdataclassesr�r��pathlibr�typingrrrrZ	iniconfigrZ_pytest.cacheproviderrZ_pytest.compatr	r
rZ_pytest.configr
rrZ_pytest.deprecatedrZ_pytest.fixturesrrZ_pytest.mainrZ_pytest.monkeypatchrZ
_pytest.nodesrrrZ_pytest.pytesterrrrZ_pytest.terminalrZ_pytest.tmpdirrZtyping_extensionsrZpexpectrr�Z	dataclassr�r�r~r�r�r�r�r�r�r�r�r�r�r�r��objectr�r(r(r(r)�<module>srY
 


�


Youez - 2016 - github.com/yon3zu
LinuXploit