
    Je                     *    d Z ddlmZ ddlmZmZ d Zy)zTests utilities.    )Qt)QMessageBoxQApplicationc                     t        j                         }|D ]3  }t        |t              s| j	                  |t
        j                         5 y)z
    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   topLevelWidgets
isinstancer   keyClickr   	Key_Enter)qtbottop_level_widgetsws      3/usr/lib/python3/dist-packages/spyder/utils/test.pyclose_message_boxr      s>     %446 ,a%NN1bll+,    N)__doc__qtpy.QtCorer   qtpy.QtWidgetsr   r   r    r   r   <module>r      s      4,r   