o
    tPf                     @   s   d dl mZmZmZ d dlZd dlZd dlZddlmZ ddlm	Z	 G dd de
ZG dd	 d	ejZG d
d deZG dd deZG dd deZdd ZeZeZeZejs^ejrmejrmdd Zdd ZejrmeZeZe
efddZe
fddZdS )    )absolute_importprint_functiondivisionN   )sysinfo)sixc                   @      e Zd ZdZdS )FlakyAssertionErrorz2Re-raised so that we know it's a known-flaky test.N__name__
__module____qualname____doc__ r   r   U/var/www/html/humari/django-venv/lib/python3.10/site-packages/gevent/testing/flaky.pyr	          r	   c                   @   r   )	FlakyTestz
    A unittest exception that causes the test to be skipped when raised.

    Use this carefully, it is a code smell and indicates an undebugged problem.
    Nr
   r   r   r   r   r   #   r   r   c                   @   r   )FlakyTestRaceConditionzP
    Use this when the flaky test is definitely caused by a race condition.
    Nr
   r   r   r   r   r   *   r   r   c                   @   r   )FlakyTestTimeoutzY
    Use this when the flaky test is definitely caused by an
    unexpected timeout.
    Nr
   r   r   r   r   r   /   r   r   c                   @   r   )FlakyTestCrashesz3
    Use this when the test sometimes crashes.
    Nr
   r   r   r   r   r   5   r   r   c                   C   s&   t ttt d t d  d S Nr      )r   reraiser	   sysexc_infor   r   r   r   reraiseFlakyTestRaceCondition:   s   
r   c                  C   .   t t d } ttt| t d  d S r   )strr   r   r   r   r   msgr   r   r   r   E   s
   
c                  C   r   r   )r   r   r   r   r   r   r   r   r   r   reraiseFlakyTestTimeoutY   s
   
r    c                    s    fdd}|S )Nc                    s   t   fdd}|S )Nc                     s*   z|   W d S  y      Y d S w )Nr   )args)_funcexc_kindfr   r   mg   s
   z2reraises_flaky_timeout.<locals>.wrapper.<locals>.m)	functoolswraps)r$   r%   r"   r#   )r$   r   wrapperf   s   z'reraises_flaky_timeout.<locals>.wrapperr   )r#   r"   r)   r   r(   r   reraises_flaky_timeoutd   s   	r*   c                 C   s   t | tdS )N)r"   )r*   r   )r#   r   r   r   reraises_flaky_race_conditionq   s   r+   )
__future__r   r   r   r   r&   unittest r   r   AssertionErrorr	   SkipTestr   r   r   r   r   r    "reraiseFlakyTestRaceConditionLibuvreraiseFlakyTestTimeoutLibuvRUNNING_ON_CIPYPYWINLIBUVr*   r+   r   r   r   r   <module>   s.   