§
     žfW  ã                  ór   — d dl mZ d dlmZmZ d dlmZ ddlmZ erd dl	m
Z
 edd„¦   «         Zdd„Zdd„ZdS )é    )Úannotations)ÚAbstractContextManagerÚcontextmanager)ÚTYPE_CHECKINGé   )Ú_core)Ú	GeneratorÚexpectedÚboolÚreturnúGenerator[None, None, None]c              #  óR  K  — d}t          j        ¦   «         }|j        }|j        }	 dV — | r%|j        |k    s|j        |k    rt	          d¦  «        ‚| s%|j        |k    s|j        |k    rt	          d¦  «        ‚dS dS # | s%|j        |k    s|j        |k    rt	          d¦  «        ‚w xY w)z5Check if checkpoints are executed in a block of code.TNz'assert_checkpoints block did not yield!z$assert_no_checkpoints block yielded!)r   Úcurrent_taskÚ_cancel_pointsÚ_schedule_pointsÚAssertionError)r
   Ú__tracebackhide__ÚtaskÚorig_cancelÚorig_schedules        ú\/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/trio/testing/_checkpoints.pyÚ_assert_yields_or_notr      sõ   è è € ð ÐÝÔÑÔ€DØÔ%€KØÔ)€Mð
IØˆˆˆØð 	LØÔ ;Ò.Ð.°$Ô2GÈ=Ò2XÐ2Xå Ð!JÑKÔKÐKàð 	IØÔ ;Ò.Ð.°$Ô2GÈ=Ò2XÐ2Xå Ð!GÑHÔHÐHð	Ið 	IØ2XÐ2Xøð ð 	IØÔ ;Ò.Ð.°$Ô2GÈ=Ò2XÐ2Xå Ð!GÑHÔHÐHÐHÐHÐHÐHs   §+A= Á=)B&úAbstractContextManager[None]c                 ó$   — d} t          d¦  «        S )a©  Use as a context manager to check that the code inside the ``with``
    block either exits with an exception or executes at least one
    :ref:`checkpoint <checkpoints>`.

    Raises:
      AssertionError: if no checkpoint was executed.

    Example:
      Check that :func:`trio.sleep` is a checkpoint, even if it doesn't
      block::

         with trio.testing.assert_checkpoints():
             await trio.sleep(0)

    T©r   ©r   s    r   Úassert_checkpointsr       s   € ð  ÐÝ  Ñ&Ô&Ð&ó    c                 ó$   — d} t          d¦  «        S )aÜ  Use as a context manager to check that the code inside the ``with``
    block does not execute any :ref:`checkpoints <checkpoints>`.

    Raises:
      AssertionError: if a checkpoint was executed.

    Example:
      Synchronous code never contains any checkpoints, but we can double-check
      that::

         send_channel, receive_channel = trio.open_memory_channel(10)
         with trio.testing.assert_no_checkpoints():
             send_channel.send_nowait(None)

    TFr   r   s    r   Úassert_no_checkpointsr    4   s   € ð  ÐÝ  Ñ'Ô'Ð'r   N)r
   r   r   r   )r   r   )Ú
__future__r   Ú
contextlibr   r   Útypingr   Ú r   Úcollections.abcr	   r   r   r    © r   r   ú<module>r'      sÃ   ðØ "Ð "Ð "Ð "Ð "Ð "à =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ø  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð àð *Ø)Ð)Ð)Ð)Ð)Ð)ð ðIð Ið Iñ „ðIð&'ð 'ð 'ð 'ð((ð (ð (ð (ð (ð (r   