o
    >h                     @   s$   d dl Z d dlmZ edd ZdS )    N)contextmanagerc                 c   s$    t jj}| t j_| V  |t j_dS )a  
    This is a context-manager that sets the txaio event-loop to the
    one supplied temporarily. It's up to you to ensure you pass an
    event_loop or a reactor instance depending upon asyncio/Twisted.

    Use like so:

    .. sourcecode:: python

        from twisted.internet import task
        with replace_loop(task.Clock()) as fake_reactor:
            f = txaio.call_later(5, foo)
            fake_reactor.advance(10)
            # ...etc
    N)txaioconfigloop)new_looporig r   n/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/txaio/testutil.pyreplace_loop   s
   r
   )r   
contextlibr   r
   r   r   r   r	   <module>   s   