X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fyacsloader_swig%2FTest%2FtestResume.py;h=d8dd3a6fa8cd6b8bbce9cc5cdaaa9f9753d1a010;hb=refs%2Fheads%2Femc2_project;hp=a63c8a13d5b28e5d8332c852d253346695dca13c;hpb=eda5485fe33a2c578536e7041134d0be8a1f5bb2;p=modules%2Fyacs.git diff --git a/src/yacsloader_swig/Test/testResume.py b/src/yacsloader_swig/Test/testResume.py index a63c8a13d..d8dd3a6fa 100755 --- a/src/yacsloader_swig/Test/testResume.py +++ b/src/yacsloader_swig/Test/testResume.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (C) 2006-2019 CEA/DEN, EDF R&D +# Copyright (C) 2006-2022 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,7 @@ import os import SALOMERuntime import loader import pilot +import salome class TestResume(unittest.TestCase): @@ -39,6 +40,12 @@ class TestResume(unittest.TestCase): self.statefile = os.path.join(workdir, 'dumpPartialBloc2.xml') pass + def tearDown(self): + salome.salome_init() + cm = salome.lcc.getContainerManager() + cm.ShutdownContainers() + pass + def test1_PartialExec(self): # --- stop execution after breakpoint time.sleep(1) @@ -88,9 +95,9 @@ class TestResume(unittest.TestCase): pass if __name__ == '__main__': - import os - U = os.getenv('USER') - with open("/tmp/" + U + "/UnitTestsResult", 'a') as f: + dir_test = tempfile.mkdtemp(suffix=".yacstest") + file_test = os.path.join(dir_test,"UnitTestsResult") + with open(file_test, 'a') as f: f.write(" --- TEST src/yacsloader: testResume.py\n") suite = unittest.makeSuite(TestResume) result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)