test_{{cookiecutter.application_name}}.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:cookiecutter-pyqt5 作者: mandeep 项目源码 文件源码
def test_about_dialog(window, qtbot, mock):
    """Test the About item of the Help submenu.

    Qtbot clicks on the help sub menu and then navigates to the About item. Mock creates
    a QDialog object to be used for the test.
    """
    qtbot.mouseClick(window.help_sub_menu, Qt.LeftButton)
    qtbot.keyClick(window.help_sub_menu, Qt.Key_Down)
    mock.patch.object(QDialog, 'exec_', return_value='accept')
    qtbot.keyClick(window.help_sub_menu, Qt.Key_Enter)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号