Пример #1
0
 def test_execute_action(self):
     w = Window()
     fd = StringIO("print('Hello world !')")
     w.load(fd)
     w.ui.actionRun.trigger()
     self.assertEqual(w.ui.console.toPlainText(), "Hello world !\n")
Пример #2
0
 def test_load_text(self):
     w = Window()
     fd = StringIO("Hello")
     w.load(fd)
     self.assertEqual(w.currentText(), "Hello")