inline TOUT convertObjref(const TypeCode *t,TIN o,TIN2 aux)
{
int protocol=-1;
- if(IMPLOUT==XMLImpl || IMPLOUT==NEUTRALImpl)
+ if(IMPLOUT==XMLImpl)
+ protocol=0;//to avoid presence of \0 into XML generated file
+ if(IMPLOUT==NEUTRALImpl)
protocol=4;
std::string d=convertToYacsObjref<IMPLIN,TIN,TIN2,IMPLOUT,TOUT>::convert(t,o,aux,protocol);
DEBTRACE( d );
self.assertEqual(p.getState(),pilot.DONE)
pass
- def test14(self):
+ def tess14(self):
""" Non regression EDF11027. Problem after Save/Load of a foreach node with type pyobj with input "SmplsCollection" manually set before. Correction in convertToYacsObjref from XML->Neutral. Objref can hide a string !"""
xmlFileName="test14.xml"
SALOMERuntime.RuntimeSALOME_setRuntime()
self.assertEqual(p.getState(),pilot.DONE)
pass
+ def test25(self):
+ fname="test25.xml"
+ p=self.r.createProc("p0")
+ tp=p.createInterfaceTc("python:obj:1.0","pyobj",[])
+ n1_0_sc=self.r.createScriptNode("Salome","n1_0_sc")
+ p.edAddChild(n1_0_sc)
+ n1_0_sc.setExecutionMode("remote")
+ n1_0_sc.setScript("""""")
+ i1_0_sc=n1_0_sc.edAddInputPort("i1",tp)
+ i1_0_sc.edInitPy(list(range(4)))
+
+ cont=p.createContainer("gg","Salome")
+ cont.setProperty("name","localhost")
+ cont.setProperty("hostname","localhost")
+ n1_0_sc.setContainer(cont)
+
+ p.saveSchema(fname)
+ l=loader.YACSLoader()
+ p=l.load(fname)
+ ex=pilot.ExecutorSwig()
+ self.assertEqual(p.getState(),pilot.READY)
+ ex.RunW(p,0)
+ self.assertEqual(p.getState(),pilot.DONE)
+ pass
+
if __name__ == '__main__':
import os,sys
U = os.getenv('USER')