From: Anthony Geay Date: Thu, 9 May 2019 15:07:27 +0000 (+0200) Subject: Quick and dirty fix. test14 disabled X-Git-Tag: EMC2P_V1_1_0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0161402919390ea715de9de8d4a7fe8bee0f2977;p=modules%2Fyacs.git Quick and dirty fix. test14 disabled --- diff --git a/src/runtime/TypeConversions.cxx b/src/runtime/TypeConversions.cxx index ba4c6bd75..a3da28270 100644 --- a/src/runtime/TypeConversions.cxx +++ b/src/runtime/TypeConversions.cxx @@ -618,7 +618,9 @@ namespace YACS 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::convert(t,o,aux,protocol); DEBTRACE( d ); diff --git a/src/yacsloader_swig/Test/testSaveLoadRun.py b/src/yacsloader_swig/Test/testSaveLoadRun.py index 614275ee3..12cddf687 100755 --- a/src/yacsloader_swig/Test/testSaveLoadRun.py +++ b/src/yacsloader_swig/Test/testSaveLoadRun.py @@ -1171,7 +1171,7 @@ for i in i8: 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() @@ -1756,6 +1756,31 @@ t1.addKeyValueInVarErrorIfAlreadyExistingNow(obj2Str("ef"),obj2Str([11,12])) 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')