Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 19 Mar 2020 12:38:04 +0000 (13:38 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 19 Mar 2020 12:38:04 +0000 (13:38 +0100)
src/yacsloader_swig/Test/testFEDyn.py

index 40170b47a1cd8b7fb0cf3ad2f0c65e65d6ea9ea0..c754304385442a0a938e290a6673d716d07e8f39 100644 (file)
@@ -8,15 +8,17 @@ p=r.createProc("prTest1")
 td=p.createType("double","double")
 ti=p.createType("int","int")
 cont=p.createContainer("gg","HPSalome")
+cont.setSizeOfPool(4)
+cont.setProperty("name","localhost")
+cont.setProperty("hostname","localhost")
 ti=p.createType("int","int")
 tsi=p.createSequenceTc("seqint","seqint",ti)
 # Level0
 n0=r.createScriptNode("","n0")
 o0=n0.edAddOutputPort("o0",tsi)
-n0.setScript("o0=[ elt for elt in range(6) ]")
+n0.setScript("o0=[ elt for elt in range(8) ]")
 p.edAddChild(n0)
 n1=r.createForEachLoopDyn("n1",ti)
-n1.setWeight(3)
 n10=r.createScriptNode("","n10")
 n10.setExecutionMode("remote")
 n10.setContainer(cont)
@@ -40,4 +42,11 @@ o4=n2.edAddOutputPort("o4",tsi)
 n2.setScript("o4=i3")
 p.edAddChild(n2)
 p.edAddCFLink(n1,n2)
-p.edAddLink(o2,i3)
\ No newline at end of file
+p.edAddLink(o2,i3)
+#p.saveSchema(fname)
+#p=l.load(fname)
+ex=pilot.ExecutorSwig()
+assert(p.getState()==pilot.READY)
+ex.RunW(p,0)
+assert(p.getState()==pilot.DONE)
+assert(o4.getPyObj()==[0, 2, 4, 6, 8, 10, 12, 14])