Salome HOME
Updated copyright comment
[tools/medcoupling.git] / src / ParaMEDMEM_Swig / ParaMEDMEMTestTools.py
index 9190f8742beb6b2059034cb291d934c3b000d4da..bdd02e441a8b12ad10314ecef9bf2231c012401a 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2021  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2024  CEA, EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 
 def WriteInTmpDir(func):
     def decaratedFunc(*args,**kwargs):
-        import tempfile,os
+        import tempfile,os, sys
         ret = None
         with tempfile.TemporaryDirectory() as tmpdirname:
             os.chdir(tmpdirname)
             ret = func(*args,**kwargs)
+            os.chdir(os.path.dirname(tmpdirname))
             pass
         return ret
     return decaratedFunc