class BoxContentDialogTestCase(unittest.TestCase): def testExample(self): logging.debug(self.__class__.__name__ +': testExample()') self.app = QApplication(sys.argv) self.window = QMainWindow() self.app.setActiveWindow(self.window) self._boxContentDialog=BoxContentDialog(self.window) self._boxContentDialog.addButton("&label","str(object.label)") self.app.connect(self._boxContentDialog, SIGNAL("scriptChanged"), self.scriptChanged) self._boxContentDialog.onScreen() if not hasattr(unittest,"NO_GUI_TEST"): self.app.exec_() def scriptChanged(self,script): logging.debug(self.__class__.__name__ +': script changed '+str(script))
class BoxContentDialogTestCase(unittest.TestCase): def testExample(self): logging.debug(self.__class__.__name__ + ": testExample()") self.app = QApplication(sys.argv) self.window = QMainWindow() self.app.setActiveWindow(self.window) self._boxContentDialog = BoxContentDialog(self.window) self._boxContentDialog.addButton("&label", "str(object.label)") self.app.connect(self._boxContentDialog, SIGNAL("scriptChanged"), self.scriptChanged) self._boxContentDialog.onScreen() if not hasattr(unittest, "NO_GUI_TEST"): self.app.exec_() def scriptChanged(self, script): logging.debug(self.__class__.__name__ + ": script changed " + str(script))