From: Paul RASCLE Date: Sat, 13 Jan 2018 13:44:54 +0000 (+0100) Subject: fix YacsLoaderTest_swig: abort at the end of python -m unittest discover, in runUnitT... X-Git-Tag: V9_0_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a58acdc84f346ebd77a5b5ddd7a33ec8116b48e7;p=modules%2Fyacs.git fix YacsLoaderTest_swig: abort at the end of python -m unittest discover, in runUnitTests.sh. 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... --- diff --git a/src/yacsloader_swig/Test/testSaveLoadRun.py b/src/yacsloader_swig/Test/testSaveLoadRun.py index c81ac983b..f7ac36e70 100755 --- a/src/yacsloader_swig/Test/testSaveLoadRun.py +++ b/src/yacsloader_swig/Test/testSaveLoadRun.py @@ -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