def test_WrapLinesController_wrap_(): m = Mocker() cmd = m.replace(wrap_selected_lines) tv = m.mock(TextView) ctl = WrapLinesController.create_with_textview(tv) cmd(tv, ctl.opts) m.method(ctl.save_options)() m.method(ctl.cancel_)(None) with m: ctl.wrap_(None)
def execute(self, textview, sender): from editxt.wraplines import WrapLinesController WrapLinesController.create_with_textview(textview).begin_sheet(sender)