def test_attach(self): self.panel = OutputPanel.create(self.window, self.panel_name, unlisted=True) other = OutputPanel(self.window, self.panel_name) self.assertEqual(self.panel.view.id(), other.view.id()) self.panel.destroy() self.assertRaises(ValueError, other.tell)
def __init__(self, window, view, new_file_path, output=None, file_path=None, *args, **kwargs): """Guess what this does. """ self.window = window self.view = view self.file_path = file_path or view.file_name() self.new_file_path = new_file_path if isinstance(output, OutputPanel): self.output = output elif window: self.output = OutputPanel(window, self.output_panel_name)
def test_init_nonexistent_error(self): with self.assertRaises(ValueError): OutputPanel(self.window, 'nonexistent_output_panel')