From: Cédric Aguerre Date: Wed, 10 Aug 2016 09:13:59 +0000 (+0200) Subject: Use real temporary file name for unit tests trace X-Git-Tag: V8_1_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b12152e61cb3d6556dc88a323a8f35c5905bc99;p=modules%2Fparavis.git Use real temporary file name for unit tests trace --- diff --git a/test/VisuPrs/bugs/A5.py b/test/VisuPrs/bugs/A5.py index d5af545e..357194dc 100644 --- a/test/VisuPrs/bugs/A5.py +++ b/test/VisuPrs/bugs/A5.py @@ -34,9 +34,10 @@ data_file = datadir + "TimeStamps.med" tmp_dir = os.getenv("TmpDir") if tmp_dir == None: - tmp_dir = "/tmp" + import tempfile + tmp_dir = tempfile.mkdtemp() -save_file = tmp_dir + "/TimeStamps_save.hdf" +save_file = os.path.join(tmp_dir, "TimeStamps_save.hdf") print "Save to file ", save_file pvsimple.OpenDataFile(data_file) diff --git a/test/VisuPrs/bugs/C5.py b/test/VisuPrs/bugs/C5.py index d1e47240..f48af7b6 100644 --- a/test/VisuPrs/bugs/C5.py +++ b/test/VisuPrs/bugs/C5.py @@ -144,7 +144,8 @@ theDuration = 20 NbOfLoops = 4 #thePath = os.getenv("TMP_DIR") thePrefix = "TestPngFromAnim" -thePath = os.path.join("/tmp", thePrefix) +import tempfile +thePath = os.path.join(tempfile.mkdtemp(), thePrefix) thePath += ".png" displayMng = DisplayManager()