Exemple #1
0
    def test_xmlWrite(self):
        classes = [(IPETFilter, "filter"), (Aggregation, "agg"),
                   (IPETFilterGroup, "group"), (IPETValue, "instance"),
                   (IPETEvaluationColumn, "column")]

        for cl, basename in classes:
            node = cl()
            try:
                saveAsXML(node, os.path.join(TMPDIR, basename + ".xml"))
            except TypeError as e:
                raise e

        ev = IPETEvaluation.fromXMLFile(EVALTEST)
        try:
            saveAsXML(ev, os.path.join(TMPDIR, "test.xml"))
        except TypeError as e:
            print(ev.attributesToStringDict())
            raise e
Exemple #2
0
 def test_testEvaluateXML(self):
     ev = IPETEvaluation.fromXMLFile(EVALTEST)
Exemple #3
0
            parent = self
        me = IpetTreeViewItem(editable, parent)
        self.editable2item[editable] = me
        self.bindItemIcon(me, editable)

        if editable.getChildren():
            for idx, child in enumerate(editable.getChildren()):
                self.createAndAddItem(child, me)

        self.expandItem(me)


editframecontent = None
if __name__ == "__main__":

    ev = IPETEvaluation.fromXMLFile("test/testevaluate.xml")

    app = QApplication(sys.argv)
    mainwindow = QMainWindow()
    thewidget = QWidget(mainwindow)
    treeview = IpetTreeView(thewidget)

    layout = QHBoxLayout()
    layout.addWidget(treeview)

    editframe = QFrame(thewidget)
    layout.addWidget(editframe)

    layout2 = QGridLayout()

    editframe.setLayout(layout2)