ó
~-Ź[c           @   s   d  Z  d d l Z d d l Z d d l j j Z d d l m Z m	 Z	 m
 Z
 d a a d   Z d   Z d Z e j e j d k  d
  d    Z d S(   s   Test eventloop integrationi˙˙˙˙Ni   (   t   flush_channelst   start_new_kernelt   executec           C   s   t    \ a a t t  d S(   sC   start the global kernel (if it isn't running) and return its clientN(   R   t   KMt   KCR    (    (    (    s=   lib/python2.7/site-packages/ipykernel/tests/test_eventloop.pyt   setup   s    c           C   s   t  j   t j d t  d  S(   Nt   now(   R   t   stop_channelsR   t   shutdown_kernelt   True(    (    (    s=   lib/python2.7/site-packages/ipykernel/tests/test_eventloop.pyt   teardown   s    
s>   
from ipykernel.tests._asyncio import async_func
async_func()
i   i   s   async/await syntax requiredc          C   sš   t  t  t d t  \ }  } | d d k s; t |   t  t  t t t  \ }  } | d d k sv t |   t j   t  t  t t t  \ }  } | d d k sľ t  d  S(   Ns   %gui asynciot   statust   ok(   R    R   R   t   AssertionErrort
   async_codeR   t   interrupt_kernel(   t   msg_idt   content(    (    s=   lib/python2.7/site-packages/ipykernel/tests/test_eventloop.pyt   test_asyncio_interrupt   s    



(   i   i   (   t   __doc__t   syst   timet   IPython.testing.decoratorst   testingt
   decoratorst   dect   utilsR    R   R   t   NoneR   R   R   R
   R   t   skipift   version_infoR   (    (    (    s=   lib/python2.7/site-packages/ipykernel/tests/test_eventloop.pyt   <module>   s   
		