Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/testing/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/testing/__pycache__/exclusions.cpython-311.pyc

�

�܋f�3���ddlZddlZddlZddlZddlmZddlmZddlmZddlm	Z	d)d�Z
d)d	�ZGd
�de��Z
d�Zd
�Zd)d�Zd)d�ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZejZd�Zd�Zd�Zd�Zd �Zd)d!�Zed"���Z d)d#�Z!d$�Z"d)d%�Z#d)d&�Z$d)d'�Z%d(�Z&dS)*�N�)�config�)�util)�	decorator)�inspect_getfullargspecc�v�t��}t||��}|j�|��|S�N)�compound�
_as_predicate�skips�add��	predicate�reason�rule�preds    �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/sqlalchemy/testing/exclusions.py�skip_ifr�3���:�:�D���F�+�+�D��J�N�N�4�����K�c�v�t��}t||��}|j�|��|Sr
)rr�failsrrs    r�fails_ifrrrc��eZdZd�Zd�Zd�Zd�Zd�Zed���Z	d�Z
d�Zd	�Zd
�Z
d�Zejd���Zd
�Zdd�Zdd�ZdS)rc�x�t��|_t��|_t��|_dSr
)�setrr
�tags��selfs r�__init__zcompound.__init__#s'���U�U��
��U�U��
��E�E��	�	�	rc�,�|�|��Sr
)r�r �others  r�__add__zcompound.__add__(s���x�x����rc���t��}|j�|j��|j�|j��|j�|j��|Sr
)rr
�updaterr)r rs  r�as_skipszcompound.as_skips+sX���z�z���
���$�*�%�%�%��
���$�*�%�%�%��	�����#�#�#��rc��t��}|j�|j��|j�|j��|j�|j��|D]_}|j�|j��|j�|j��|j�|j���`|Sr
�rrr'r
r)r �others�copyr$s    rrzcompound.add2s����z�z���
���$�*�%�%�%��
���$�*�%�%�%��	�����#�#�#��	)�	)�E��J���e�k�*�*�*��J���e�k�*�*�*��I���U�Z�(�(�(�(��rc��t��}|j�d�|jD����|j�d�|jD����|j�|j��|S)Nc3�4K�|]}t|��V��dSr
��NotPredicate)�.0�fails  r�	<genexpr>z compound.not_.<locals>.<genexpr>?�*����D�D��,�t�,�,�D�D�D�D�D�Drc3�4K�|]}t|��V��dSr
r/)r1�skips  rr3z compound.not_.<locals>.<genexpr>@r4rr*)r r,s  r�not_z
compound.not_=sv���z�z���
���D�D���D�D�D�D�D�D��
���D�D���D�D�D�D�D�D��	�����#�#�#��rc�@�|�tj��Sr
)�enabled_for_configr�_currentrs r�enabledzcompound.enabledDs���&�&�v��7�7�7rc�f�|j�|j��D]}||��rdS�dS)NFT�r
�unionr)r rrs   rr9zcompound.enabled_for_configHsH����)�)�$�*�5�5�	�	�I��y�� � �
��u�u�
��4rc�Z���fd�|j�|j��D��S)Nc�P��g|]"}|����
|������#S���
_as_string)r1rrs  �r�
<listcomp>z4compound.matching_config_reasons.<locals>.<listcomp>PsG���
�
�
���y�� � �
�� � ��(�(�
�
�
rr=�r rs `r�matching_config_reasonsz compound.matching_config_reasonsOs@���
�
�
�
�!�Z�-�-�d�j�9�9�
�
�
�	
rc��t|j�|��o|p|j�|����Sr
)�boolr�intersection)r �include_tags�exclude_tagss   r�include_testzcompound.include_testVsK����	�&�&�|�4�4�4�
K�!�!�I�T�Y�%;�%;�L�%I�%I�
�
�	
rc��|j�|j��|j�|j��|j�|j��dSr
)r
r'rrr#s  r�_extendzcompound._extend\sP���
���%�+�&�&�&��
���%�+�&�&�&��	�����$�$�$�$�$rc���t|d��r|j����|St�fd���}||��}�|_|S)N�_sa_exclusion_extendc�<���jtj|g|�Ri|��Sr
)�_dorr:)�fn�args�kwr s   �r�decoratez#compound.__call__.<locals>.decoratefs)����4�8�F�O�R�=�$�=�=�=�"�=�=�=r)�hasattrrPrNr)r rSrV�	decorateds`   r�__call__zcompound.__call__asr����2�-�.�.�	��#�+�+�D�1�1�1��I�	�	>�	>�	>�	>�
��	>��H�R�L�L�	�)-�	�&��rc#�LK�t��}|j�|j�|j����	dV�|�tj��dS#t$r+}|�	tj|��Yd}~dSd}~wwxYwr
)
rrr'r
r>�_expect_successrr:�	Exception�_expect_failure)r �	all_fails�exs   r�fail_ifzcompound.fail_ifns������J�J�	�����t�z�/�/��
�;�;�<�<�<�	7��E�E�E�
�%�%�f�o�6�6�6�6�6���	;�	;�	;��%�%�f�o�r�:�:�:�:�:�:�:�:�:�����	;���s�	A.�.
B#�8 B�B#c�d�|jD]M}||��r@dtj���d|�|����}tj|���N	||i|��}|�||j���|S#t$r(}|�|||j���Yd}~dSd}~wwxYw)N�'z' : )�name)	r
r�get_current_test_namerC�	skip_testr[�__name__r\r])	r �cfgrSrTrUr6�msg�return_valuer_s	         rrRzcompound._dozs����J�	&�	&�D��t�C�y�y�
&�
&��0�2�2�2�2��O�O�C�(�(�(���� ��%�%�%��	 ��2�t�?�r�?�?�L�
� � ��2�;� �7�7�7����	�	<�	<�	<�� � ��b�r�{� �;�;�;�;�;�;�;�;�;�����	<���s�A=�=
B/�B*�*B/�blockc	�f�|jD]{}||��rntjr%t|���dd���}nt|��}t
|�d|�|���d|�d���dS�|tj|tj
��d���dS)	Nzutf-8�ignore)�errorsz failed as expected (z): � r)�with_traceback)rr�py2k�unicode�encode�str�printrC�raise_�sys�exc_info)r rr_rcr2�str_exs      rr]zcompound._expect_failure�s����J�	>�	>�D��t�F�|�|�
��9�%�$�R�[�[�/�/���/�I�I�F�F� ��W�W�F�� �4�4�����!8�!8�!8�!8�&�&�&�B�������
�
�K��3�<�>�>�!�+<�=�=�=�=�=�=rc
���|jsdS|jD]G}|���r:td|�dd��fd�|jD�����d�����HdS)NzUnexpected success for 'z' (� and c3�B�K�|]}|����V��dSr
rB)r1r2rs  �rr3z+compound._expect_success.<locals>.<genexpr>�s@�����%�%�8<�D�O�O�F�3�3�%�%�%�%�%�%r�))r�AssertionError�join)r rrcr2s `  rr[zcompound._expect_success�s�����z�	��F��J�
	�
	�D��t�F�|�|�	
�$�n�������%�%�%�%�@D�
�%�%�%���������	
�
	�
	rN)rj)rf�
__module__�__qualname__r!r%r(rr7�propertyr;r9rFrLrNrY�
contextlib�contextmanagerr`rRr]r[rArrrr"s���������
������	�	�	�����8�8��X�8����
�
�
�
�
�
�%�%�%�
�����	7�	7���	7� � � �">�>�>�>�"�����rrc�"�t|g��Sr
)r)�tagnames r�requires_tagr��s����	�?�?�rc�V�t��}|j�|��|Sr
)rrr')�tagnames�comps  rrr�s&���:�:�D��I���X�����Krc�Z�t|��}tt|��|��Sr
)rrr0�rrs  r�only_ifr��s'���i�(�(�I��<�	�*�*�F�3�3�3rc�Z�t|��}tt|��|��Sr
)rrr0r�s  r�succeeds_ifr��s'���i�(�(�I��L��+�+�V�4�4�4rc�6�eZdZedd���Zdd�Zdd�ZdS)	�	PredicateNc�l��t|t��r��|j|��St|t��r|r|j�||_|St|ttf��rt�fd�|D��|��St|t��r	t|�St|tj��r�tjd|��}|std|z���|�d��}|�d��}|�d��r?td�|�d���d��D����nd}t||||�	��Stj|��rt'||��SJd|z���)Nc�:��g|]}��|����SrA)�as_predicate)r1r�clss  �rrDz*Predicate.as_predicate.<locals>.<listcomp>�s'���>�>�>�D��!�!�$�'�'�>�>�>rz.([\+\w]+)\s*(?:(>=|==|!=|<=|<|>)\s*([\d\.]+))?z(Couldn't locate DB name in predicate: %rrr�c3�4K�|]}t|��V��dSr
)�int)r1�ds  rr3z)Predicate.as_predicate.<locals>.<genexpr>�s(����A�A��c�!�f�f�A�A�A�A�A�Ar�.)�descriptionFzunknown predicate type: %s)�
isinstancerr�r9r�r��listr�OrPredicate�tuple�
SpecPredicater�string_types�re�match�
ValueError�group�split�callable�LambdaPredicate)r�rr��tokens�db�op�specs`      rr�zPredicate.as_predicate�s�����i��*�*� 	C��#�#�I�$@�+�N�N�N�
�	�9�
-�
-�	C��
4�y�4�<�(3�	�%���
�	�D�#�;�
/�
/�	C��>�>�>�>�I�>�>�>����
��	�5�
)�
)�	C� �)�,�,�
�	�4�#4�
5�
5�	C��X�A�9���F��
� �>��J�������a���B����a���B��<�<��?�?���A�A�f�l�l�1�o�o�&;�&;�C�&@�&@�A�A�A�A�A�A��
�!��R��;�G�G�G�G�
�]�9�
%�
%�	C�"�9�k�:�:�:�B�6��B�B�B�5rFc���||��}|r|}|j|r|jj���nd|r|jj���nd|rdnd|rdndd�zS)Nz<no driver>z
<no database>zdoesn't supportzdoes support)�driver�database�doesnt_support�does_support)r�r��url�get_driver_name�get_backend_name)r r�negate�bool_s    r�_format_descriptionzPredicate._format_description�s�����V�����	��J�E�����f�i�m�3�3�5�5�5���!��	�
�6�6�8�8�8� �38�L�/�/�n�.3�J�N�N�9J�	#
�	#
�	
�		
rc��t���r
)�NotImplementedError�r rr�s   rrCzPredicate._as_string�s��!�#�#�#rr
�F)NF)rfrr��classmethodr�r�rCrArrr�r��s_�������!C�!C�!C��[�!C�F

�

�

�

�$�$�$�$�$�$rr�c�$�eZdZdd�Zd�Zdd�ZdS)�BooleanPredicateNc�,�||_|pd|z|_dS)Nz
boolean %s)�valuer�)r r�r�s   rr!zBooleanPredicate.__init__�s!����
�&�>�,��*>����rc��|jSr
)r�rEs  rrYzBooleanPredicate.__call__�s
���z�rFc�0�|�||���S)N�r��r�r�s   rrCzBooleanPredicate._as_strings���'�'��v�'�>�>�>rr
r��rfrr�r!rYrCrArrr�r��sK������?�?�?�?����?�?�?�?�?�?rr�c	��eZdZdd�Zejejejejej	ej
ejd�d�Zd�Z
d	d�ZdS)
r�Nc�>�||_||_||_||_dSr
)r�r�r�r�)r r�r�r�r�s     rr!zSpecPredicate.__init__s%����������	�&����rc�2�||dko||dkS)NrrrA)�val�pairs  r�<lambda>zSpecPredicate.<lambda>s��S�D��G�^�%F��t�A�w��r)�<�>z==z!=z<=z>=�in�betweenc�r�|j}d|jvr|j�d��\}}n	|jd}}|r
|j|krdS|�
|j|krdS|j�Z|�
Jd���t|��}t
|jd��r|jp|j|j}|||j��SdS)N�+Fz%DBAPI version specs not supported yetrYT)	r�r�rcr�r��_server_versionrW�_opsr�)r r�engine�dialectr��version�opers       rrYzSpecPredicate.__call__s�������$�'�>�>�"�g�m�m�C�0�0�O�G�V�V�"�g�t�V�G��	�v�{�g�-�-��5���&�-�6�"9�"9��5��7���>�>�#J�>�>�>�%�f�-�-�G�����,�,�8���N�D�I�d�g�<N�
��4����+�+�+��4rFc���|j�|�|��S|j�|r
d|jzSd|jzS|rd|j�d|j�d|j��S|j�d|j�d|j��S)Nznot %sz%sznot rn)r�r�r�r�r�r�s   rrCzSpecPredicate._as_string/s�����'��+�+�F�3�3�3�
�W�_��
&��$�'�)�)��d�g�~�%��
B�
B�)-����$�'�'�'�4�9�9�E�E�%)�W�W�W�d�g�g�g�t�y�y�A�Ar�NNNr�)rfrr�r!�operator�lt�gt�eq�ne�le�ge�containsr�rYrCrArrr�r�s�������'�'�'�'��[�
�[��k��k��k��k���F�F�	�	�D����0B�B�B�B�B�Brr�c�$�eZdZdd�Zd�Zdd�ZdS)r�Nc����t���}|ds�fd�|_n�|_|pd|_|pi|_|r	||_dS�jr�j|_dSd|_dS)Nrc������Sr
rA)r��lambda_s �rr�z*LambdaPredicate.__init__.<locals>.<lambda>Bs
���g�g�i�i�rrAzcustom function)rr�rTrUr��__doc__)r r�r�rTrUr�s `    rr!zLambdaPredicate.__init__?s����%�g�.�.���A�w�	#�/�/�/�/�D�L�L�"�D�L��J�B��	��(�����	1�*�D����
�_�	1�&��D����0�D���rc�,�|�|��Sr
)r�rEs  rrYzLambdaPredicate.__call__Ns���|�|�F�#�#�#rFc�,�|�|��Sr
r�r�s   rrCzLambdaPredicate._as_stringQs���'�'��/�/�/rr�r�r�rArrr�r�>sK������
1�
1�
1�
1�$�$�$�0�0�0�0�0�0rr�c�$�eZdZdd�Zd�Zdd�ZdS)r0Nc�"�||_||_dSr
)rr�)r rr�s   rr!zNotPredicate.__init__Vs��"���&����rc�.�|�|��Sr
)rrEs  rrYzNotPredicate.__call__Zs���>�>�&�)�)�)�)rFc�v�|jr|�||��S|j�||��Sr
)r�r�rrCr�s   rrCzNotPredicate._as_string]s@����	A��+�+�F��J�?�?�?��>�,�,�V��Z�@�@�@rr
r�r�rArrr0r0UsQ������'�'�'�'�*�*�*�A�A�A�A�A�Arr0c�2�eZdZdd�Zd�Zd	d�Zd�Zd	d�ZdS)
r�Nc�"�||_||_dSr
)�
predicatesr�)r r�r�s   rr!zOrPredicate.__init__es��$���&����rc�6�|jD]}||��rdS�dS)NTF)r�)r rrs   rrYzOrPredicate.__call__is4���O�	�	�D��t�F�|�|�
��t�t�
��urFc�b����rd}nd}|���fd�|jD����S)Nrzz or c3�F�K�|]}|������V��dS)r�NrB)r1�prr�s  ��rr3z(OrPredicate._eval_str.<locals>.<genexpr>tsD����� 
� 
�45�A�L�L���L�/�/� 
� 
� 
� 
� 
� 
r)r~r�)r rr��conjunctions `` r�	_eval_strzOrPredicate._eval_stros]�����	!�!�K�K� �K���� 
� 
� 
� 
� 
�9=�� 
� 
� 
�
�
�	
rc�n�|j�d|�|��zS|�|d���S)NzNot Tr�)r�r�r�rEs  r�
_negation_strzOrPredicate._negation_strxs:����'��D�4�4�V�<�<�<�<��>�>�&��>�6�6�6rc��|r|�|��S|j�|�|��S|�|��Sr
)r�r�r�r�r�s   rrCzOrPredicate._as_string~sM���	.��%�%�f�-�-�-���+��/�/��7�7�7��~�~�f�-�-�-rr
r�)rfrr�r!rYr�r�rCrArrr�r�dsn������'�'�'�'����
�
�
�
�7�7�7�.�.�.�.�.�.rr�c�J�t|||��tj��Sr
)r�rr:)r�r�r�s   r�_is_excludedr��s ��&�=��R��&�&�v��7�7�7rc��|���}t|jdd��}|�d}|���|S)z#Return a server_version_info tuple.�server_version_infoNrA)�connect�getattrr��close)r��connr�s   rr�r��sC���>�>���D��f�n�&;�T�B�B�G������J�J�L�L�L��Nrc�4�td�|D����S)Nc�B�g|]}t�|����SrA�r�r��r1r�s  rrDzdb_spec.<locals>.<listcomp>�s&��A�A�A�r�	�.�.�r�2�2�A�A�Ar�r���dbss r�db_specr�s���A�A�S�A�A�A�B�B�Brc�<�ttdd����S)NFzmark as execute�rr�rArr�openr
�s���#�E�+<�=�=�>�>�>rc�<�ttdd����S)NTzmarked as skipr	rArr�closedr�s���#�D�*:�;�;�<�<�<rc�@�ttd|pd����S)NTzexpected to fail)rr�)rs rrr�s!���$�T�6�+G�5G�H�H�I�I�Irc�<�tt|��d��S)NzFuture feature)rr�)rS�args  r�futurer�s���O�B�'�'�)9�:�:�:rc�"�t||��Sr
)r�r�rs  r�fails_onr�s���B����rc�N�ttd�|D������S)Nc�B�g|]}t�|����SrArrs  rrDz.fails_on_everything_except.<locals>.<listcomp>�s&��#M�#M�#M�2�I�$:�$:�2�$>�$>�#M�#M�#Mr)r�r�rs r�fails_on_everything_exceptr�s'���{�#M�#M��#M�#M�#M�N�N�O�O�Orc�"�t||��Sr
)rrs  rr6r6�s���2�v���rc�x��tt�fd�tj|��D������S)Nc�F��g|]}t�|�����SrAr)r1r�rs  �rrDzonly_on.<locals>.<listcomp>�s)���L�L�L�B�Y�
#�
#�B��
/�
/�L�L�Lr)r�r�r�to_list)rrs `r�only_onr�sC�����L�L�L�L�$�,�s�:K�:K�L�L�L�	
�	
���rc�@�tt|||��|��Sr
)rr�)r�r�r�rs    r�excluder�s���=��R��.�.��7�7�7rc�^�|s
Jd���td�|D����|��S)Nzno queries sent!c�B�g|]}t�|����SrAr)r1�querys  rrDzagainst.<locals>.<listcomp>�s&��K�K�K�%�	�.�.�u�5�5�K�K�Krr)r�queriess  r�againstr"�sD���&�&�&�&�&�7�L�;�K�K�7�K�K�K�L�L����rr
)'r�r�r�rv�rrr�util.compatrrr�objectrr�rr�r�r�r�r�r�r0r�r�rr�r�rr
rrrrrr6rrr"rArr�<module>r&s,����������	�	�	�	�
�
�
�
�������������������0�0�0�0�0�0���������H�H�H�H�H�v�H�H�H�V������4�4�4�4�
5�5�5�5�
5$�5$�5$�5$�5$��5$�5$�5$�p	?�	?�	?�	?�	?�y�	?�	?�	?�6B�6B�6B�6B�6B�I�6B�6B�6B�r0�0�0�0�0�i�0�0�0�.A�A�A�A�A�9�A�A�A�!.�!.�!.�!.�!.�)�!.�!.�!.�H�&�
�8�8�8�	�	�	�C�C�C�?�?�?�=�=�=�J�J�J�J��;�;���;� � � � �P�P�P���������8�8�8�8�����r

Hacked By AnonymousFox1.0, Coded By AnonymousFox