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)
test_{{cookiecutter.application_name}}.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录