def test_xml_ibox(self): """ Method to test if a pbox can contain an ibox. """ # Return to new line print # Create the box self.mypbox = Pbox(self.myiterativedesc) # Test raises self.assertRaises(ValueError, self.mypbox) # Test execution self.mypbox.inputs.inp = "str" self.mypbox() self.assertEqual(self.mypbox.outputs.outp.value, "str0str1") if 0: from PySide import QtGui import sys from casper.view import PipelineView app = QtGui.QApplication.instance() if app is None: app = QtGui.QApplication(sys.argv) pview = PipelineView(self.mypbox) pview.show() app.exec_()
def test_pbox(self): """ Method to test if a pbox can be displayed properly. """ # Create the box self.mypbox = Pbox(self.mypyramiddesc) self.mypbox._boxes["c2"].active = False self.mypbox._boxes["c7"].active = False getattr(self.mypbox._boxes["c7"].inputs, "inp").optional = True # Test view pview = PipelineView(self.mypbox) pview.show() # Start the qt loop self.app.exec_() # Test events pview.zoom_in() pview.zoom_out() QTest.keyClicks(pview, "p")