
    q-Ph[                    T    d dl mZ d dlZd dlZd dlmZ d dlmZ 	 dddddZddZ	dS )    )annotationsN)settings)ParametricProfileNamesfastF)set_environmentprofileParametricProfileNames | intr   boolreturnNonec                  ddd}t          |           }dD ]\  }}t          j        d
d| |d| |                                st	          j        d|          r<t          |                    dd	                    }d| }t          j        d
||d| d|                    dd	           }t          j        |           |rt          |           dS dS )ae  
    Load a named (or custom) hypothesis profile for use with the parametric tests.

    .. warning::
        This functionality is currently considered **unstable**. It may be
        changed at any point without it being considered a breaking change.

    Parameters
    ----------
    profile : {str, int}, optional
        Name of the profile to load; one of "fast", "balanced", "expensive", or
        the integer number of iterations to run (which will create and register
        a custom profile with that value).

    set_environment : bool, default False
        If True, also set the environment variable `POLARS_HYPOTHESIS_PROFILE`
        to the given profile name/value.

    Examples
    --------
    >>> # load a custom profile that will run with 1500 iterations
    >>> from polars.testing.parametric import load_profile
    >>> load_profile(1500)
    TN)
print_blobdeadline))r   d   )balancedi  )	expensivei'  zpolars.)namemax_exampleszpolars\.custom\.[\d_]+$zpolars.custom.  )
strr   register_profileisdigitrematchintreplaceload_profileset_profile)r   r   common_settingsprofile_namer   
iterationsn_iterationss          b/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/testing/parametric/profiles.pyr   r      sK   6 &*t<<Ow<<L 	
 	
j
 	! 	
!4!!#	
 	
 	
 	
 	
 	
  
*Dl!S!S 
<//0@"EEFF666! 	
%	
 	
 	
 	
 	
 C\11)R@@BBL,''' "L!!!!!" "    c                `   t          |                               d          d         }|                    dd                                          rt          t	          |                    }n1ddlm}  |t                    }||vrd|d|}t          |          |t          j
        d	<   d
S )a  
    Set the env var `POLARS_HYPOTHESIS_PROFILE` to the given profile name/value.

    .. warning::
        This functionality is currently considered **unstable**. It may be
        changed at any point without it being considered a breaking change.

    Parameters
    ----------
    profile : {str, int}, optional
        Name of the profile to load; one of "fast", "balanced", "expensive", or
        the integer number of iterations to run (which will create and register
        a custom profile with that value).

    Examples
    --------
    >>> # prefer the 'balanced' profile for running parametric tests
    >>> from polars.testing.parametric import set_profile
    >>> set_profile("balanced")
    ._r   r   )get_argszinvalid profile name z; expected one of POLARS_HYPOTHESIS_PROFILEN)r   splitr   r   r   typingr*   r   
ValueErrorosenviron)r   r!   r*   valid_profile_namesmsgs        r$   r   r   J   s    * w<<%%c**2.LC$$,,.. 	"3|,,-- 	$#####&h'=>>222c,ccL_ccCS//!.:BJ*+++r%   )r   )r   r	   r   r
   r   r   )r   r	   r   r   )

__future__r   r/   r   
hypothesisr   polars._typingr   r   r   r   r%   r$   <module>r6      s    " " " " " " 				 				       1 1 1 1 1 1 -3<"OT<" <" <" <" <" <"~!; !; !; !; !; !;r%   