ó
‹²,]c           @   sE   d  Z  d d l Z d d l m Z d d l m Z m Z d „  Z d S(   s   Tests utilities.iÿÿÿÿN(   t   Qt(   t   QMessageBoxt   QApplicationc         C   sF   t  j ƒ  } x3 | D]+ } t | t ƒ r |  j | t j ƒ q q Wd S(   sò   
    Closes QMessageBox's that can appear when testing.

    You can use this with QTimer to close a QMessageBox.
    Before calling anything that may show a QMessageBox call:
    QTimer.singleShot(1000, lambda: close_message_box(qtbot))
    N(   R   t   topLevelWidgetst
   isinstanceR   t   keyClickR    t	   Key_Enter(   t   qtbott   top_level_widgetst   w(    (    s0   lib/python2.7/site-packages/spyder/utils/test.pyt   close_message_box   s    (   t   __doc__t   ost   qtpy.QtCoreR    t   qtpy.QtWidgetsR   R   R
   (    (    (    s0   lib/python2.7/site-packages/spyder/utils/test.pyt   <module>   s   