19 from .process
import Process
20 from ..widgets
import Label, Font
26 wx.EvtHandler.__init__(self)
27 self.Bind(wx.EVT_TIMER, self.
OnTimerOnTimer)
28 self.
namename = config.name
39 self.
_timer_timer.Start(500)
42 finished = self.
_process_process.is_finished()
43 self.
_window_window.update_output(self.
_process_process.get_output(), finished)
50 except Exception
as err:
51 wx.MessageBox(str(err), style=wx.ICON_ERROR)
57 wx.ScrolledWindow.__init__(self, notebook)
63 sizer = wx.BoxSizer(wx.VERTICAL)
67 self.SetScrollRate(20, 20)
70 if sys.version_info[:2] >= (2,6):
81 notebook.add_tab(self,
'%s (running)' % name, allow_closing=
False)
82 notebook.show_tab(self)
86 self.
_output_output.update(output)
87 self.SetVirtualSize(self.
_output_output.Size)
90 self.Parent.allow_closing(self)
99 self.Parent.disallow_closing(self)
104 self.Parent.rename_tab(self, name)
110 Label.__init__(self, parent)
111 self.SetFont(Font().fixed)
114 self.SetLabel(self.LabelText + addition.decode(
'UTF-8',
'ignore'))
123 wx.Button.__init__(self, parent, label=
'Stop')
124 self.Bind(wx.EVT_BUTTON, self.
OnClickOnClick, self)
128 getattr(self.Parent,
'On' + self.LabelText.replace(
' ',
''))()
132 self.SetLabel(
'Run Again')
136 self.SetLabel(
'Stop')
142 wx.Button.__init__(self, parent, label=
'Run Again')
143 self.Bind(wx.EVT_BUTTON, self.
OnClickOnClick, self)
147 self.Parent.OnRunAgain()
def OnTimer(self, event=None)
def __init__(self, config, notebook)
def _get_output_window(self, notebook)
def __init__(self, parent)
def update(self, addition)
def update_output(self, output, finished=False)
def _create_state_button(self)
def _rename_tab(self, name)
def __init__(self, notebook, runner)
def _add_to_notebook(self, notebook, name)
def run(*tests, **options)
Programmatic entry point for running tests.