U
    e hZ  ã                   @   sN   d dl Z d dlmZ d dlmZ d Ze jddddd„ ƒZe  ¡ d	d
„ ƒZdS )é    N)ÚFaker)ÚDEFAULT_LOCALEÚsessionT)ZscopeZautousec                 C   s&   d| j kr|  d¡}ntg}t|dS )zÖFixture that stores the session level ``Faker`` instance.

    This fixture is internal and is only meant for use within the project.
    Third parties should instead use the ``faker`` fixture for their tests.
    Zfaker_session_locale©Úlocale)ÚfixturenamesÚgetfixturevaluer   r   )Úrequestr   © r
   ú?/tmp/pip-unpacked-wheel-cwn3b9ao/faker/contrib/pytest/plugin.pyÚ_session_faker	   s    
r   c                 C   s\   d| j kr |  d¡}t|d}n
|  d¡}t}d| j krB|  d¡}|j|d |j ¡  |S )z>Fixture that returns a seeded and suitable ``Faker`` instance.Zfaker_localer   r   Z
faker_seed)Úseed)r   r   r   ÚDEFAULT_SEEDZseed_instanceÚuniqueÚclear)r	   r   Zfaker   r
   r
   r   Úfaker   s    





r   )Zpytestr   r   Zfaker.configr   r   Zfixturer   r
   r
   r
   r   Ú<module>   s   
