test_text_edit_protocol_view.py 文件源码

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

项目:urh 作者: jopohl 项目源码 文件源码
def test_create_context_menu(self):
        self.add_signal_to_form("esaver.complex")
        self.form.signal_tab_controller.signal_frames[0].ui.cbProtoView.setCurrentIndex(2)

        logger.debug("Get text edit")
        text_edit = self.form.signal_tab_controller.signal_frames[0].ui.txtEdProto

        menu = text_edit.create_context_menu()
        QApplication.instance().processEvents()
        line_wrap_action = next(action for action in menu.actions() if action.text().startswith("Linewrap"))
        checked = line_wrap_action.isChecked()
        line_wrap_action.trigger()

        menu = text_edit.create_context_menu()
        QApplication.instance().processEvents()
        line_wrap_action = next(action for action in menu.actions() if action.text().startswith("Linewrap"))
        self.assertNotEqual(checked, line_wrap_action.isChecked())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号