當前位置: 首頁>>代碼示例>>Python>>正文


Python PythonMode.remove_plotter方法代碼示例

本文整理匯總了Python中mu.modes.python3.PythonMode.remove_plotter方法的典型用法代碼示例。如果您正苦於以下問題:Python PythonMode.remove_plotter方法的具體用法?Python PythonMode.remove_plotter怎麽用?Python PythonMode.remove_plotter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mu.modes.python3.PythonMode的用法示例。


在下文中一共展示了PythonMode.remove_plotter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_python_remove_plotter_reset_focus

# 需要導入模塊: from mu.modes.python3 import PythonMode [as 別名]
# 或者: from mu.modes.python3.PythonMode import remove_plotter [as 別名]
def test_python_remove_plotter_reset_focus():
    """
    Ensure the button states are returned to normal before calling super
    method.
    """
    editor = mock.MagicMock()
    view = mock.MagicMock()
    pm = PythonMode(editor, view)
    pm.remove_plotter()
    view.current_tab.setFocus.assert_called_once_with()
開發者ID:martinohanlon,項目名稱:mu,代碼行數:12,代碼來源:test_python3.py

示例2: test_python_remove_plotter

# 需要導入模塊: from mu.modes.python3 import PythonMode [as 別名]
# 或者: from mu.modes.python3.PythonMode import remove_plotter [as 別名]
def test_python_remove_plotter():
    """
    Ensure the button states are returned to normal before calling super
    method.
    """
    editor = mock.MagicMock()
    view = mock.MagicMock()
    with mock.patch('builtins.super') as mock_super:
        pm = PythonMode(editor, view)
        pm.set_buttons = mock.MagicMock()
        mock_super.reset_mock()
        pm.remove_plotter()
        pm.set_buttons.assert_called_once_with(run=True, repl=True, debug=True)
        mock_super().remove_plotter.assert_called_once_with()
開發者ID:martinohanlon,項目名稱:mu,代碼行數:16,代碼來源:test_python3.py

示例3: test_python_toggle_plotter

# 需要導入模塊: from mu.modes.python3 import PythonMode [as 別名]
# 或者: from mu.modes.python3.PythonMode import remove_plotter [as 別名]
def test_python_toggle_plotter():
    """
    Ensure toggling the plotter causes it to be added/removed.
    """
    editor = mock.MagicMock()
    view = mock.MagicMock()
    pm = PythonMode(editor, view)
    pm.add_plotter = mock.MagicMock()
    pm.remove_plotter = mock.MagicMock()
    pm.toggle_plotter()
    pm.add_plotter.assert_called_once_with()
    pm.plotter = True
    pm.toggle_plotter()
    pm.remove_plotter.assert_called_once_with()
開發者ID:martinohanlon,項目名稱:mu,代碼行數:16,代碼來源:test_python3.py


注:本文中的mu.modes.python3.PythonMode.remove_plotter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。