コード例 #1
0
def historylog(qtbot, monkeypatch):
    """Return a fixture for base history log, which is a plugin widget."""
    monkeypatch.setattr(history.HistoryLog, 'register_widget_shortcuts',
                        lambda *args: None)
    historylog = history.HistoryLog(None)
    qtbot.addWidget(historylog)
    historylog.show()
    yield historylog
    historylog.closing_plugin()
    historylog.close()
コード例 #2
0
def historylog(qtbot):
    """
    Return a fixture for base history log, which is a plugin widget.
    """
    historylog = history.HistoryLog(None, configuration=CONF)
    historylog.close = lambda: True
    qtbot.addWidget(historylog.get_widget())
    historylog.get_widget().show()
    yield historylog
    historylog.on_close()
    historylog.close()