
    G@d                     ,    d Z ddlmZ ddlmZmZ d ZdS )zTests utilities.    )Qt)QMessageBoxQApplicationc                     t          j                    }|D ]7}t          |t                    r |                     |t
          j                   8dS )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      1lib/python3.11/site-packages/spyder/utils/test.pyclose_message_boxr      sU     %466 , ,a%% 	,NN1bl+++, ,    N)__doc__qtpy.QtCorer   qtpy.QtWidgetsr   r   r    r   r   <module>r      sR            4 4 4 4 4 4 4 4, , , , ,r   