From 5c0bf61bcf3df9a479ee72eb7bd3b63346c2aa21 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 1 Sep 2006 08:55:18 +0000 Subject: [PATCH] SWP12681 --- src/GEOM_SWIG/GEOM_TestOthers.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/GEOM_SWIG/GEOM_TestOthers.py b/src/GEOM_SWIG/GEOM_TestOthers.py index dff28b812..3b4f6f943 100644 --- a/src/GEOM_SWIG/GEOM_TestOthers.py +++ b/src/GEOM_SWIG/GEOM_TestOthers.py @@ -30,32 +30,36 @@ def TestExportImport (geompy, shape): print "Test Export/Import ...", + tmpDir = os.getenv("TEMP") + if tmpDir == None: + tmpDir = "/tmp" + # Files for Export/Import testing - fileExportImport = "/tmp/testExportImport.brep" - fileExportImportBREP = "/tmp/testExportImportBREP.brep" - fileExportImportIGES = "/tmp/testExportImportIGES.iges" - fileExportImportSTEP = "/tmp/testExportImportSTEP.step" + fileExportImport = tmpDir + "/testExportImport.brep" + fileExportImportBREP = tmpDir + "/testExportImportBREP.brep" + fileExportImportIGES = tmpDir + "/testExportImportIGES.iges" + fileExportImportSTEP = tmpDir + "/testExportImportSTEP.step" if os.access(fileExportImport, os.F_OK): if os.access(fileExportImport, os.W_OK): os.remove(fileExportImport) else: - fileExportImport = "/tmp/testExportImport1.brep" + fileExportImport = tmpDir + "/testExportImport1.brep" if os.access(fileExportImportBREP, os.W_OK): os.remove(fileExportImportBREP) else: - fileExportImportBREP = "/tmp/testExportImportBREP1.brep" + fileExportImportBREP = tmpDir + "/testExportImportBREP1.brep" if os.access(fileExportImportIGES, os.W_OK): os.remove(fileExportImportIGES) else: - fileExportImportIGES = "/tmp/testExportImportIGES1.iges" + fileExportImportIGES = tmpDir + "/testExportImportIGES1.iges" if os.access(fileExportImportSTEP, os.W_OK): os.remove(fileExportImportSTEP) else: - fileExportImportSTEP = "/tmp/testExportImportSTEP1.step" + fileExportImportSTEP = tmpDir + "/testExportImportSTEP1.step" # Export geompy.Export(shape, fileExportImport, "BREP") -- 2.39.2