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__/main.cpython-39.pyc
a

05d�~�@sddZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddl
mZddl
m
Z
ddl
mZddl
mZdd	l
mZdd
l
mZddl
mZddl
mZdd
l
mZddl
mZddl
mZddlZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+ddl*m,Z,ddl*m-Z-ddl*m.Z.dd l/m0Z0dd!l/m1Z1dd"l2m3Z3dd#l2m4Z4e�r�dd$l5m6Z6e%dd%�d&d'�Z7e8e8d(�d)d*�Z9eeed+geee:e ffee:e fd,�d-d.�Z;eee:e fd/�d0d1�Z<ed+eee:e fd2�d3d4�Z=d+dd5�d6d7�Z>d+e?d5�d8d9�Z@e	e?d(�d:d;�ZAe	eee?d<�d=d>�ZBeejCedd?�d@dA�ZDGdBdC�dC�ZEGdDdE�dEeF�ZGGdFdG�dGeH�ZIejJGdHdI�dIee	e8f��ZKeGdJd+�d+ejL��ZMe8e8dK�dLdM�ZNdNdO�e	e8e?ee	ee8fdP�dQdR�ZOdS)SzHCore implementation of the testing process: init, session, runtest loop.�N)�Path)�Callable)�Dict)�	FrozenSet)�Iterator)�List)�Optional)�Sequence)�Set)�Tuple)�Type)�
TYPE_CHECKING)�Union)�nodes)�final)�overload)�Config)�
directory_arg)�ExitCode)�hookimpl)�PytestPluginManager)�
UsageError)�Parser)�FixtureManager)�exit��absolutepath)�bestrelpath��
fnmatch_ex)�visit)�
CollectReport)�
TestReport)�collect_one_node)�
SetupState)�Literal)�parser�returnc	Cs�|jdddgd�d�|jdddgd�|�dd	�}|jd
ddd
ddd�|�d�}|jddddd�|jdddd�|jdddtd
ddd �|jd!d"d#d�|jd$d"d%d�|jd&d"d'd�|jd(d)td*d+d,�|jd-d"d.d/d0d1�|jd2dd3d4d5�|�d6d7�}|jd8d9d:d"d;d�|jd<d"d=d�|jd>dd?d@dA�|jdBdd?dCdA�|jdDddEdFdA�|jdGdHddItjtdGdJ�dKdL�|jdMd"dNd.dOdP�|jdQdRd"dSd.dTdP�|jdUd"dVd.dWdP�|jdXdYgdZ�d[d\d]�|�d^d_�}|jd`dadt	dIdbdc�dS)dN�
norecursedirsz)Directory patterns to avoid for recursion�args)	z*.eggz.*�_darcsZbuild�CVSZdistZnode_modules�venvz{arch})�type�defaultZ	testpathszZDirectories to search for tests when no files or directories are given on the command lineZgeneralzRunning and selection optionsz-xz--exitfirst�store_const�maxfail�z,Exit instantly on first error or failed test)�action�dest�const�helpzpytest-warningsz-Wz--pythonwarnings�appendz<Set which warnings to report, see -W option of Python itself)r2r5�filterwarningsZlinelistz_Each line specifies a pattern for warnings.filterwarnings. Processed after -W/--pythonwarnings.)r-r5z	--maxfailZnum�storerz'Exit after first num failures or errors)�metavarr2r-r3r.r5z--strict-config�
store_truezbAny warnings encountered while parsing the `pytest` section of the configuration file raise errorsz--strict-markerszVMarkers not registered in the `markers` section of the configuration file raise errorsz--strictz&(Deprecated) alias to --strict-markersz-c�fileZinifilenamezbLoad configuration from `file` instead of trying to locate one of the implicit configuration files)r9r-r3r5z--continue-on-collection-errorsF�continue_on_collection_errorsz4Force test execution even if collection errors occur)r2r.r3r5z	--rootdirZrootdirz�Define root directory for tests. Can be relative path: 'root_dir', './root_dir', 'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: '$HOME/root_dir'.)r2r3r5�collect�
collectionz
--collectonlyz--collect-onlyz--coz&Only collect tests, don't execute themz--pyargsz1Try to interpret all arguments as Python packagesz--ignore�pathz-Ignore path during collection (multi-allowed))r2r9r5z
--ignore-globz5Ignore path pattern during collection (multi-allowed)z
--deselectZ
nodeid_prefixzDDeselect item (via node id prefix) during collection (multi-allowed)z--confcutdirZ
confcutdir�dir)Zoptnamez1Only load conftest.py's relative to specified dir)r3r.r9r-r5z--noconftestZ
noconftestz Don't load any conftest.py files)r2r3r.r5z--keepduplicatesz--keep-duplicates�keepduplicateszKeep duplicate testsz--collect-in-virtualenv�collect_in_virtualenvz2Don't ignore tests in a local virtualenv directoryz
--import-mode�prepend)rCr6�	importlib�
importmodez\Prepend/append to sys.path when importing test modules and conftest files. Default: prepend.)r.�choicesr3r5Zdebugconfigz(test session debugging and configurationz
--basetempZbasetempz^Base temporary directory for this test run. (Warning: this directory is removed if it exists.))r3r.r-r9r5)
ZaddiniZgetgroupZ
_addoptionZ	addoption�int�str�	functools�partialr�validate_basetemp)r&�group�rM�0/usr/lib/python3.9/site-packages/_pytest/main.py�pytest_addoption2s4���
���	������	����������	�rO�r?r'cCsld}|st�|��tttd�dd�}|t��t|����rDt�|��|t����t|����rht�|��|S)NzWbasetemp must not be empty, the current working directory or any parent directory of it)�base�queryr'cSs||krdS||jvS)z,Return whether query is an ancestor of base.T)�parents)rQrRrMrMrN�is_ancestor�sz&validate_basetemp.<locals>.is_ancestor)�argparse�ArgumentTypeErrorr�bool�cwd�absolute�resolve)r?�msgrTrMrMrNrK�s


rK�Session)�config�doitr'cCs�t�|�}tj|_d}�z:z4|��d}|jj|d�d}|||�pFd|_W�nltyltj	|_�Y�nPt
y�tj|_Y�n6tt
jf�ytjj��}tj}t|jt
j�r�|jjdur�|jj}|dkr�tj�|j�d|jj�d��|jj|d�||_Yn�t�y�tj|_tjj��}z|�||j �WnZt
j�y�}z>|jdu�rh|j|_tj�t!|�j"�d|�d��WYd}~n$d}~00t|jt#��r�tj�d	�Yn0Wd}t$�%|j&�|dk�rJz|jj'||jd
�WnZt
j�yH}z>|jdu�r|j|_tj�t!|�j"�d|�d��WYd}~n
d}~00|�(�n�d}t$�%|j&�|dk�r�z|jj'||jd
�WnZt
j�y�}z>|jdu�r�|j|_tj�t!|�j"�d|�d��WYd}~n
d}~00|�(�0|jS)zSkeleton command line program.rr1��session�Nz: �
)�excinfoz(mainloop: caught unexpected SystemExit!
)r`�
exitstatus))r\�from_configrZOKrdZ
_do_configure�hookZpytest_sessionstartrZUSAGE_ERROR�Failed�TESTS_FAILED�KeyboardInterruptr�	Exception�_pytest�_codeZ
ExceptionInfoZfrom_currentZINTERRUPTED�
isinstance�value�
returncode�sys�stderr�write�typenamer[Zpytest_keyboard_interrupt�
BaseExceptionZINTERNAL_ERRORZnotify_exception�optionr-�__name__�
SystemExit�os�chdir�	startpathZpytest_sessionfinishZ_ensure_unconfigure)r]r^r`Z	initstatercrd�excrMrMrN�wrap_sessionsz

4
�
4
�
�
4
r|�r]r'cCs
t|t�S�N)r|�_main�r]rMrMrN�pytest_cmdline_main;sr�)r]r`r'cCs<|jj|d�|jj|d�|jr(tjS|jdkr8tjSdS)z[Default command line protocol for initialization, session,
    running tests and reporting.r_rN)rf�pytest_collection�pytest_runtestloop�testsfailedrrh�testscollectedZNO_TESTS_COLLECTED)r]r`rMrMrNr?s
r)r`r'cCs|��dSr~)�perform_collectr_rMrMrNr�Lsr�cCs�|jr2|jjjs2|�d|j|jdkr(dndf��|jjjr@dSt|j�D]b\}}|dt|j�krr|j|dnd}|jj	j
||d�|jr�|�|j��|j
rJ|�|j
��qJdS)Nz%d error%s during collectionr1�s�T)�item�nextitem)r�r]rur<�InterruptedZcollectonly�	enumerate�items�lenrfZpytest_runtest_protocol�
shouldfailrg�
shouldstop)r`�ir�r�rMrMrNr�Ps ��
$r�cs`|�tj�d�rdnd�}z|��s*WdSWnty@YdS0d�t�fdd�|��D��S)z�Attempt to detect if ``path`` is the root of a Virtual Environment by
    checking for the existence of the appropriate activate script.�winZScripts�binF)Zactivatezactivate.cshz
activate.fishZActivatezActivate.batzActivate.ps1c3s|]}|j�vVqdSr~��name)�.0Zfname�Z	activatesrMrN�	<genexpr>u�z_in_venv.<locals>.<genexpr>)�joinpathrp�platform�
startswith�is_dir�OSError�any�iterdir)r?ZbindirrMr�rN�_in_venvds
r�)�collection_pathr]r'cs�|jd�j|jd�}|pg}|�d�}|r>|�dd�|D���|vrJdS|jd�j|jd�}|pdg}|�d�}|r�|�d	d�|D��t�fd
d�|D��r�dS|�d�}|s�t��r�dSdS)NZcollect_ignore)r?�rootpath�ignorecss|]}t|�VqdSr~r�r��xrMrMrNr�r�z(pytest_ignore_collect.<locals>.<genexpr>TZcollect_ignore_globZignore_globcss|]}t|�VqdSr~rr�rMrMrNr��r�c3s"|]}t�t��t|��VqdSr~)�fnmatchrH)r��glob�r�rMrNr��r�rB)Z_getconftest_pathlist�parentr��	getoption�extendr�r�)r�r]Zignore_pathsZ
excludeoptZignore_globsZexcludegloboptZ
allow_in_venvrMr�rN�pytest_ignore_collectxs,
�

�

r�)r�r]r'cCspt|�d�pg�}|sdSg}g}|D]&}|j�|�rB|�|�q&|�|�q&|rl|jj|d�||dd�<dS)NZdeselect)r�)�tupler��nodeidr�r6rfZpytest_deselected)r�r]Zdeselect_prefixesZ	remainingZ
deselectedZcolitemrMrMrN�pytest_collection_modifyitems�sr�c@s*eZdZedd�dd�Zed�dd�ZdS)�FSHookProxyN)�pmr'cCs||_||_dSr~)r��remove_mods)�selfr�r�rMrMrN�__init__�szFSHookProxy.__init__r�cCs |jj||jd�}||j|<|S)N)Zremove_plugins)r�Zsubset_hook_callerr��__dict__)r�r�r�rMrMrN�__getattr__�s
zFSHookProxy.__getattr__)rv�
__module__�__qualname__rr�rHr�rMrMrMrNr��sr�c@seZdZdZdZdS)r�z*Signals that the test run was interrupted.�builtinsN�rvr�r��__doc__rMrMrMrNr��sr�c@seZdZdZdS)rgz"Signals a stop as failed test run.Nr�rMrMrMrNrg�srgc@s*eZdZUdZeed<eed�dd�ZdS)�_bestrelpath_cache)r?r?rPcCst|j|�}|||<|Sr~)rr?)r�r?�rrMrMrN�__missing__�sz_bestrelpath_cache.__missing__N)rvr�r��	__slots__r�__annotations__rHr�rMrMrMrNr��s
r�cs�eZdZUeZeZeed<eed<ee	e
fed<edd��fdd�Ze
edd�dd	��Zed
�dd�Zeed
�d
d��Zeed�dd�Zedd�dd
�dd��Zedd�eeefdd�dd��ZeZeedfed�dd�Zdd�dd�Zd ed!�d"d#�Zd3eeee j!d$�d%d&�Z"e#d4e$eed(ee j%d)�d*d+��Z&e#d5e$eeeeee j%e j!fd)�d,d+��Z&d6e$eeeeee j%e j!fd)�d-d+�Z&e'ee j%e j!fd
�d.d/�Z(ee j%e j!fe'e j%d0�d1d2�Z)�Z*S)7r\Z_setupstateZ_fixturemanagerrdNr}cslt�j|jdd||dd�d|_d|_d|_d|_|jj�	d�|_t
�|_t|j�|_
|jjj|dd�dS)Nr�)r?�fspathr�r]r`r�rFr>r`r�)�superr�r�r�r�r�r��trace�root�get�	frozenset�
_initialpathsr��_bestrelpathcacher]�
pluginmanager�register)r�r]��	__class__rMrNr��s �zSession.__init__cCs|j|d�}|S)Nr�)Z_create)�clsr]r`rMrMrNre�szSession.from_config)r'cCs$d|jj|jt|dd�|j|jfS)Nz6<%s %s exitstatus=%r testsfailed=%d testscollected=%d>rdz<UNSET>)r�rvr��getattrr�r��r�rMrMrN�__repr__�s
�zSession.__repr__cCs
|jjjS)zQThe path from which pytest was invoked.

        .. versionadded:: 7.0.0
        )r]�invocation_paramsr@r�rMrMrNrz�szSession.startpath)�	node_pathr'cCs
|j|Sr~)r�)r�r�rMrMrN�_node_location_to_relpath�sz!Session._node_location_to_relpathT)ZtryfirstcCs(|jr|�|j��|jr$|�|j��dSr~)r�rgr�r�r�rMrMrN�pytest_collectstartszSession.pytest_collectstart)�reportr'cCsH|jrDt|d�sD|jd7_|j�d�}|rD|j|krDd|j|_dS)NZwasxfailr1r0zstopping after %d failures)Zfailed�hasattrr�r]�getvaluer�)r�r�r0rMrMrN�pytest_runtest_logreports
z Session.pytest_runtest_logreportzos.PathLike[str]rPcCs t|t�r|nt|�}||jvSr~)rmrr�)r�r?Zpath_rMrMrN�
isinitpathszSession.isinitpath�r�cCsrt|t�r|nt|�}|jj}|j||j�d�|jjd�}|j�|�}|rfddl	m
}|t||��}n|jj}|S)NrE)r�r1)�PathAwareHookProxy)
rmrr]r�Z_getconftestmodulesr�r�Z_conftest_plugins�
differenceZ
config.compatr�r�rf)r�r�r?r�Zmy_conftestmodulesr�r��proxyrMrMrN�gethookproxys
�zSession.gethookproxyzos.DirEntry[str])�direntryr'csb|jdkrdSt|j��|��j�}|j�|jd�r8dS|j�d�}t�fdd�|D��r^dSdS)N�__pycache__F�r�r]r(c3s|]}t|��VqdSr~r)r��patr�rMrNr�6r�z#Session._recurse.<locals>.<genexpr>T)	r�rr?r�r�r�r]Zgetinir�)r�r��ihookZnorecursepatternsrMr�rN�_recurse.s

zSession._recurse)r��handle_dupesr'cCs�|��s(Jd�||��|��|�����|�|�}|�|�sP|j||jd�rPdS|r�|j�	d�}|s�|jj
j}||vrzdS|�|�|j
||d�S)Nz9{!r} is not a file (isdir={!r}, exists={!r}, islink={!r})r�rMrA)Z	file_pathr�)�is_file�formatr��exists�
is_symlinkr�r�r�r]r�r�Z_duplicatepaths�addZpytest_collect_file)r�r�r�r�rAZduplicate_pathsrMrMrN�_collectfile:s$���



zSession._collectfile.z
Literal[True])r)�genitemsr'cCsdSr~rM�r�r)r�rMrMrNr�RszSession.perform_collectcCsdSr~rMr�rMrMrNr�Xsc

Cs�|dur|jj}|�d||�|jjjd7_g|_g|_g|_|jj}|j}�z6g}|D]<}t	|jj
j||jjj
d�\}}|j�||f�|�|�q\t|�|_t|�}	|jj|	d�|jjjd8_|j�r&g}
|jD]>\}}|�r|
�d|�d|�d|�d	��q�|
�d
|���q�t|
��|�s4|	j}n(|	j�r\|	jD]}|j�|�|���qB|jj��|j||j|d�W|j|d�n|j|d�0t|�|_|S)
a�Perform the collection phase for this session.

        This is called by the default :hook:`pytest_collection` hook
        implementation; see the documentation of this hook for more details.
        For testing purposes, it may also be called directly on a fresh
        ``Session``.

        This function normally recursively expands any collectors collected
        from the session to their items, and only items are returned. For
        testing purposes, this may be suppressed by passing ``genitems=False``,
        in which case the return value contains these collectors unexpanded,
        and ``session.items`` is empty.
        Nr�r1��	as_pypath�r�znot found: z

(no name z in any of �)zfound no collectors for )r`r]r�r_)r]r)r�r��indent�	_notfound�_initial_partsr�rf�resolve_collection_argumentr�r@ruZpyargsr6r�r�r#r��pytest_collectreportr�result�passedr�r�r�Z
check_pendingr�Zpytest_collection_finishr�r�)
r�r)r�rfr�Zinitialpaths�argr��parts�rep�errorsZ
collectors�noderMrMrNr�^sX�

�
�
c	cs,ddlm}i}i}i}i}|jD�]\}}|�d||f�|jjjd7_|j�dd�s�|jj}|g|j	�RD]v}	|�
|�s�q�|	��rr|	d}
|
��rr|
|vrr|j
|
dd�}|rrt|d|�r�|d|t|	�<|dg||dj<qr|���r�|�rJd	||f����t�}tt|�|j�D]�}
|
���s4�q"t|
j�}|j}||v�r�|�|�|d}
|
���r�|�
|
�D]$}|Vt||��rt||t|�<�qtt|�|v�r��q"|�
|�D]8}t|�|jf}||v�r�||Vn|||<|V�q��q"�n|���sJ�||v�r||}n.|�t|j�|�}|j
|dd�}|�rH|||<g}||fg}|�r�|�d
||�|jjjd7_|��\}}|D]�}|�s�|�|��q�t|tj��s��q�t|�|jf}||v�r�||}nt|�}|||<|j �rTg}|j!D]:}|j"|dk�s(|j"�#d�d|dk�r�|�|��q�|�rb|�||dd�f�n|j$j%|d��q�|�d
t&|�d�|jjjd8_�qV|�s�d�'t|�g|�R�}|j(�||f�q"|j"dk�r
t|d|��r
zt)t*|d�+���VWq"t,�yYq"0q"|EdH|jjjd8_q"dS)Nr)�Packagezprocessing argumentr1ZdoctestmodulesFz__init__.py)r�zinvalid arg �
matchnodes�[r�zmatchnodes finished -> r�::)-Z_pytest.pythonr�r�r�r�r�r]r�r�rSZ_is_in_confcutdirr�r�r�rmrHr?�setr r�rr�r�r�r-r��popr6r�	Collectorr�r#r�r�r��splitr�r�r��joinr��next�iterr=�
StopIteration)r�r�Znode_cache1Znode_cache2Zmatchnodes_cacheZ	pkg_rootsZargpath�namesr�r�Zpkginit�colZ	seen_dirsr�r?�dirpathr�Zkey2Zcollect_rootZmatchingZworkrZ
matchnamesr��keyr�Z
submatchnodesr�Z
report_argrMrMrNr=�s�









�



��
zSession.collect)r�r'ccsz|�d|�t|tj�r.|jj|d�|VnHt|tj�s>J�t|�}|jrh|j	D]}|�
|�EdHqR|jj|d�dS)Nr�)r�r�)r�rmr�Itemr�Zpytest_itemcollectedrr#r�r�r�r�)r�r�r�ZsubnoderMrMrNr�7s
zSession.genitems)T)..)..)NT)+rvr�r�r�rgr$r�rrrGrrr��classmethodrerHr��propertyrrzr�rr�r"r!r�r�rWr�r�r�r	rrr�rrrr�rr=r��
__classcell__rMrMr�rNr\�sb
	
�	
��������G�)�module_namer'c
Cslztj�|�}Wntttfy,|YS0|dusJ|jdusJ|jdkrN|S|jrbtj	�
|j�S|jSdS)zTSearch sys.path for the given a dotted module name, and return its file system path.N�	namespace)rD�util�	find_spec�AttributeError�ImportError�
ValueError�origin�submodule_search_locationsrxr?�dirname)r�specrMrMrN�
search_pypathGs
rFr�)�invocation_pathr�r�r'c
Cs�t|��d�\}}}|�d�^}}|r>|d�|�|��|d<|rJt|�}||}t|�}|��s~|rjdnd}	t|	j|d���|r�|��r�|r�dnd}	t|	j|d���||fS)	a`Parse path arguments optionally containing selection parts and return (fspath, names).

    Command-line arguments can point to files and/or directories, and optionally contain
    parts for specific tests selection, for example:

        "pkg/tests/test_foo.py::TestClass::test_foo"

    This function ensures the path exists, and returns a tuple:

        (Path("/full/path/to/pkg/tests/test_foo.py"), ["TestClass", "test_foo"])

    When as_pypath is True, expects that the command-line argument actually contains
    module paths instead of file-system paths:

        "pkg.tests.test_foo::TestClass::test_foo"

    In which case we search sys.path for a matching module, and then return the *path* to the
    found module.

    If the path doesn't exist, raise UsageError.
    If the path is a directory and selection parts are present, raise UsageError.
    rr���z9module or package not found: {arg} (missing __init__.py?)z"file or directory not found: {arg})r�z9package argument cannot contain :: selection parts: {arg}z;directory argument cannot contain :: selection parts: {arg})	rH�	partitionrrrr�rr�r�)
rr�r�rQZsquacket�restZstrpathr�r�r[rMrMrNr�Xs*����r�)Pr�rUZdataclassesr�rIrDrxrp�pathlibr�typingrrrrrrr	r
rrr
rZ
_pytest._coderkrZ_pytest.compatrrZ_pytest.configrrrrrrZ_pytest.config.argparsingrZ_pytest.fixturesrZ_pytest.outcomesrZ_pytest.pathlibrrrr Z_pytest.reportsr!r"Z_pytest.runnerr#r$Ztyping_extensionsr%rOrHrKrGr|r�rr�rWr�r�r�rr�r�rir�rjrgZ	dataclassr�ZFSCollectorr\rr�rMrMrMrN�<module>s�6
�;
��

Youez - 2016 - github.com/yon3zu
LinuXploit