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__/config.cpython-311.pyc

�

�܋f��l�ddlZdZdadadadZdadadadZ	d�Z
d�Zd�Zd�Z
Gd�de��Zd�ZdS)	�Nc�$�tj|i|��S)a�	Deliver multiple versions of a test based on positional combinations.

    This is a facade over pytest.mark.parametrize.


    :param \*comb: argument combinations.  These are tuples that will be passed
     positionally to the decorated function.

    :param argnames: optional list of argument names.   These are the names
     of the arguments in the test function that correspond to the entries
     in each argument tuple.   pytest.mark.parametrize requires this, however
     the combinations function will derive it automatically if not present
     by using ``inspect.getfullargspec(fn).args[1:]``.  Note this assumes the
     first argument is "self" which is discarded.

    :param id\_: optional id template.  This is a string template that
     describes how the "id" for each parameter set should be defined, if any.
     The number of characters in the template should match the number of
     entries in each argument tuple.   Each character describes how the
     corresponding entry in the argument tuple should be handled, as far as
     whether or not it is included in the arguments passed to the function, as
     well as if it is included in the tokens used to create the id of the
     parameter set.

     If omitted, the argument combinations are passed to parametrize as is.  If
     passed, each argument combination is turned into a pytest.param() object,
     mapping the elements of the argument tuple to produce an id based on a
     character value in the same position within the string template using the
     following scheme::

        i - the given argument is a string that is part of the id only, don't
            pass it as an argument

        n - the given argument should be passed and it should be added to the
            id by calling the .__name__ attribute

        r - the given argument should be passed and it should be added to the
            id by calling repr()

        s - the given argument should be passed and it should be added to the
            id by calling str()

        a - (argument) the given argument should be passed and it should not
            be used to generated the id

     e.g.::

        @testing.combinations(
            (operator.eq, "eq"),
            (operator.ne, "ne"),
            (operator.gt, "gt"),
            (operator.lt, "lt"),
            id_="na"
        )
        def test_operator(self, opfunc, name):
            pass

    The above combination will call ``.__name__`` on the first member of
    each tuple and use that as the "id" to pytest.param().


    )�_fixture_functions�combinations)�comb�kws  �l/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/sqlalchemy/testing/config.pyrrs��~�*�D�7�B�7�7�7�c��t|i|��S)z+As combination, but takes a single iterable)r)�arg_iterablers  r�combinations_listrXs����,��,�,�,r	c�$�tj|i|��S�N)r�fixture)�argrs  rrr]s���%�s�1�b�1�1�1r	c�4�t���Sr)r�get_current_test_name�r	rrras���3�3�5�5�5r	c���eZdZd�Zej��Ze��Zd�Z	e
d���Ze
d���Ze
d���Z
e
d���Ze
d���Ze
d���Ze
d	���Zd
�ZdS)�Configc��|�|��||_||_||_||_d|_d|_dS)N�test_schema�
test_schema_2)�	_set_name�db�db_opts�options�file_configrr)�selfrrrrs     r�__init__zConfig.__init__fsG�����r�������������&���(���,����r	c���|jjrEd�d�|jjD����}|j�d|j�d|�d�|_dS|j�d|j��|_dS)N�.c3�4K�|]}t|��V��dSr)�str)�.0�toks  r�	<genexpr>z#Config._set_name.<locals>.<genexpr>ts(����N�N��3�s�8�8�N�N�N�N�N�Nr	�+z_[�])�dialect�server_version_info�join�name�driver)rr�svis   rrzConfig._set_namersp��
�:�)�	7��(�(�N�N�r�z�/M�N�N�N�N�N�C�(*��������C�C�C�@�D�I�I�I�#%�7�7�7�B�I�I�6�D�I�I�Ir	c�^�t||||��}|j�|��|S)z�add a config as one of the global configs.

        If there are no configs set up yet, this config also
        gets set as the "_current".
        )r�_configs�add)�clsrrrr�cfgs      r�registerzConfig.registerys2���R��'�;�7�7�����������
r	c�h�|a|jja|ja|ja|ja|jx|_adSr)�_currentr�url�db_urlrrr�r2�config�	namespaces   r�set_as_currentzConfig.set_as_current�s;���������.���(���,�
�"�I�%�	��r�r�rr	c��ts
Jd���|�t|tjtjtj��|��dS)Nz*Can't push without a default Config set up)r6�pushrrrr)r2rr;s   r�push_enginezConfig.push_engine�sZ���E�E�E�E�E�x������H�$�h�&6��8L�
�
�
�		
�	
�	
�	
�	
r	c�p�|j�t��|�||��dSr)�_stack�appendr6r<r9s   rr>zConfig.push�s4���
���(�#�#�#����6�9�-�-�-�-�-r	c��|jr<|�|jd|��|j���dSdS)Nr)rAr<�clear)r2r;s  r�resetzConfig.reset�sL���:�	����s�z�!�}�i�8�8�8��J��������	�	r	c��|jSr)r0)r2s r�all_configszConfig.all_configs�s
���|�r	c#�JK�|���D]}|jV��dSr)rGr)r2r3s  r�all_dbszConfig.all_dbs�s6�����?�?�$�$�	�	�C��&�L�L�L�L�	�	r	c�$�t|��dSr)�	skip_test)r�msgs  rrKzConfig.skip_test�s���#�����r	N)�__name__�
__module__�__qualname__r�collections�dequerA�setr0r�classmethodr4r<r?r>rErGrIrKrr	rrres������-�-�-��[�
�
 �
 �F��s�u�u�H�7�7�7�����[���&�&��[�&��
�
��[�
��.�.��[�.�����[��
����[������[������r	rc�6�t�|���r)r�skip_test_exception)rLs rrKrK�s��
�
0�
0��
5�
5�5r	)rP�requirementsrr8rrrrr6rrrrr�objectrrKrr	r�<module>rXs���������	��	
��
�������
�����?8�?8�?8�D-�-�-�
2�2�2�6�6�6�H�H�H�H�H�V�H�H�H�V6�6�6�6�6r	

Hacked By AnonymousFox1.0, Coded By AnonymousFox