]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
fix YacsLoaderTest_swig: abort at the end of python -m unittest discover, in runUnitT...
authorPaul RASCLE <paul.rascle@edf.fr>
Sat, 13 Jan 2018 13:44:54 +0000 (14:44 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Sat, 13 Jan 2018 13:44:54 +0000 (14:44 +0100)
test15 in testSaveLadRun.py leads to a decrement on ref count visible only at the end on garbage collection.
The decrement is visible on PythonNode.cxx when activating trace with _DEVDEBUG_.
The decrement is related to the use of get() on output port instead of getPyObj() (see comment on PythonPorts.hxx).
Should we remove the use of get() in SWIG or correct it in SWIG ?
Use of get() as it is in Python leads to a potential abort later...

src/yacsloader_swig/Test/testSaveLoadRun.py

index c81ac983ba52b554c1793a83926a875c1ed42752..f7ac36e701571d24508f93c6c5c141458558b6aa 100755 (executable)
@@ -1250,7 +1250,7 @@ for i in i8:
       ex = pilot.ExecutorSwig()
       self.assertEqual(p.getState(),pilot.READY)
       ex.RunW(p,0)
-      self.assertEqual(res.get(),6)
+      self.assertEqual(res.getPyObj(),6)
       self.assertEqual(p.getState(),pilot.DONE)
     pass