Salome HOME
Remove temporary files after test execution
authorjfa <jfa@opencascade.com>
Fri, 24 Feb 2023 10:13:14 +0000 (10:13 +0000)
committerjfa <jfa@opencascade.com>
Fri, 24 Feb 2023 10:13:14 +0000 (10:13 +0000)
24 files changed:
src/ExchangePlugin/Test/TestExportPart_FullPartSet.py
src/ExchangePlugin/Test/TestExportPart_FullPart_2.py
src/ExchangePlugin/Test/TestExportPart_PartSet.py
src/ExchangePlugin/Test/TestExportPart_Results_1.py
src/ExchangePlugin/Test/TestExportPart_Results_2.py
src/ExchangePlugin/Test/TestExportPart_Results_3.py
src/ExchangePlugin/Test/TestExportPart_Results_7.py
src/ExchangePlugin/Test/TestExportPart_Results_8.py
src/ExchangePlugin/Test/TestImportPart_AfterCurrent_1.py
src/ExchangePlugin/Test/TestImportPart_AfterCurrent_2.py
src/ExchangePlugin/Test/TestImportPart_AfterLast_1.py
src/ExchangePlugin/Test/TestImportPart_AfterLast_2.py
src/ExchangePlugin/Test/TestImportPart_AfterLast_3.py
src/ExchangePlugin/Test/TestImportPart_AfterLast_4.py
src/ExchangePlugin/Test/TestImportPart_AfterLast_5.py
src/ExchangePlugin/Test/TestImportPart_AfterLast_6.py
src/ExchangePlugin/Test/TestImportPart_Construction_1.py
src/ExchangePlugin/Test/TestImportPart_Construction_2.py
src/ExchangePlugin/Test/TestImportPart_Construction_3.py
src/ExchangePlugin/Test/TestImportPart_Construction_4.py
src/ExchangePlugin/Test/TestImportPart_Multiple.py
src/ExchangePlugin/Test/TestImportPart_ToEmptyPart.py
src/ExchangePlugin/Test/TestImportPart_ToEmptyPartSet.py
src/PythonAPI/model/services/__init__.py

index 41c835bebafb6f6f988c2f5a8ce98dbf8f920288..1eccc3f30a4f3c22f2ec3941ba5074f0b9524d28 100644 (file)
@@ -70,3 +70,5 @@ model.begin()
 model.exportPart(partSet, filename)
 model.end()
 assert os.path.exists(filename), "ERROR: Failed to export full PartSet"
+
+model.removeTmpFile(filename)
index b9cfe618618f0977855dbba267564d12d846dfb0..e6fc370253b61a7ca0344f69e3479350e5057a12 100644 (file)
@@ -70,3 +70,5 @@ model.begin()
 model.exportPart(Part_2_doc, filename)
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export Part_2 to file {}".format(filename)
+
+model.removeTmpFile(filename)
index 9a8f57ac85c956ae57bc7e651acd20d435a142e7..cd5c856312555f49b98e3071ac014547a2b81776 100644 (file)
@@ -70,3 +70,5 @@ model.begin()
 model.exportPart(partSet, filename, [Axis_4.result()])
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export construction elements of PartSet"
+
+model.removeTmpFile(filename)
index a8c40de4a4d98a8c0dbff04fa4ca2052feb87290..86b2aa564e81c250e1987b3b9eb36b5819a7213f 100644 (file)
@@ -72,3 +72,5 @@ model.begin()
 model.exportPart(partSet, filename, [featureToExport.result()])
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export feature {}".format(featureToExport.name())
+
+model.removeTmpFile(filename)
index 5c9ab1119c1ab78cfae6562d8eb1e796feb54cdc..25b901cbac629d25049715f48f66e91b4c680c1c 100644 (file)
@@ -72,3 +72,5 @@ model.begin()
 model.exportPart(partSet, filename, [featureToExport.result()])
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export feature {}".format(featureToExport.name())
+
+model.removeTmpFile(filename)
index dfd89d55a8819a66a84173d79f47f05dc140ed03..0da0b60699e4ca2afde4c0b0a405a0a0e6439188 100644 (file)
@@ -72,3 +72,5 @@ model.begin()
 model.exportPart(Part_1_doc, filename, [featureToExport.result()])
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export feature {}".format(featureToExport.name())
+
+model.removeTmpFile(filename)
index 46e43ac2c9adfde31a7a1fb1e6beb7fdb75c2683..4336c5658c345696ade71c7ce8485386e7d233b0 100644 (file)
@@ -72,3 +72,5 @@ model.begin()
 model.exportPart(Part_2_doc, filename, [featureToExport.result()])
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export feature {}".format(featureToExport.name())
+
+model.removeTmpFile(filename)
index 6e4bf701a5c0de8c79a7f228bd012373e414c883..a0933e9596174d48193014b9d403744982474b0d 100644 (file)
@@ -72,3 +72,4 @@ model.begin()
 model.exportPart(Part_2_doc, filename, [featureToExport.result()])
 model.end()
 assert os.path.exists(filename), "ERROR: Cannot export feature {}".format(featureToExport.name())
+model.removeTmpFile(filename)
index 08f76918709b1c3bab1bd68cd97e23fab14edc79..86e5db84d5163dd8f5cee52aaf372e6ac6f1e32b 100644 (file)
@@ -95,6 +95,8 @@ model.begin()
 model.importPart(Part_1_doc, filename, Sketch_1)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index e592da11d231f1b3c0f48f4ddad40ce23b522aa2..f38af5faa8c52039d6ddc2edf889cceaf902b5df 100644 (file)
@@ -94,6 +94,8 @@ model.begin()
 model.importPart(Part_1_doc, filename, Extrusion_1)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index a8598cb56de5f51d686d2b4678e01eb2698f388b..9f79cf9c98131622eb4c53e68439790a1dcd55e1 100644 (file)
@@ -122,6 +122,8 @@ model.begin()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index ca89a92c2af821c976ff5fe2c3ea9db2918eb296..f26bea8ba8518845eb220aded3534f45bab9885c 100644 (file)
@@ -127,6 +127,8 @@ model.begin()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index d484fea365289fb09f397ed1b4720bf2685d4ddd..65f80f94dc74ce7f57855f4dcbdb5780516bebd8 100644 (file)
@@ -123,6 +123,8 @@ model.begin()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index 1acff3aa6fa1b8bb77439128e14a3c12d822d20d..9c2c40d66d8456bc126c11ea1c28aab299525283 100644 (file)
@@ -123,6 +123,8 @@ model.begin()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index e7fafe3768140ccdfd47664113f20f7573b01af2..4994315df1e4ffa03e71cca202b99d1b9bf178f4 100644 (file)
@@ -122,6 +122,8 @@ model.begin()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index 3c3419b71e5e616fe1589182a989fab8c713a088..7bcb2acccc1b9600b4132e72b1ac22a3c211b58e 100644 (file)
@@ -123,6 +123,8 @@ model.begin()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # compare results with the reference data
 TOLERANCE = 1.e-7
 features = Part_1_doc.allFeatures()
index e04b7151e9f188a0663d7ce16da16d32b5e14f69..45f2a163dfb628eacb888e3ed309a606f243d817 100644 (file)
@@ -67,6 +67,8 @@ partSet = model.moduleDocument()
 model.importPart(partSet, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # Test 1. No Part should be created
 assert(partSet.size(ModelAPI_ResultPart.group()) == 0)
 
index 2f8c0c9923a53510d54939436b5808efab6070a7..fdcef6ed6af2ee32bfbf5756568108cea29ff024 100644 (file)
@@ -71,6 +71,8 @@ Part_1_doc = Part_1.document()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # Test 1. No Part should be created
 assert(partSet.size(ModelAPI_ResultPart.group()) == 1)
 
index 21a9d696e3af11f69c05394435876ab3d9f00242..bf71fc6c5be55b99385d35640cd0bf149f7e25d4 100644 (file)
@@ -69,6 +69,8 @@ partSet = model.moduleDocument()
 model.importPart(partSet, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # Test 1. No new Part should be created
 assert(partSet.size(ModelAPI_ResultPart.group()) == 0)
 
index a5cb1d09c5ff325eb3f7ee7a7c2be0fd8fe2bbbb..d64d3136862ccc8dd80989451d61a888bbf2bbfd 100644 (file)
@@ -71,6 +71,8 @@ Part_1_doc = Part_1.document()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # Test 1. No new Part should be created
 assert(partSet.size(ModelAPI_ResultPart.group()) == 1)
 
index d8e5945c1241e5f5c6591ef7823b57266927e642..c42297d3931a80013d20b0c3f3d56f0082a16e0a 100644 (file)
@@ -112,4 +112,6 @@ model.importPart(Part_1_doc, filename, Translation_1)
 model.end()
 checkUniqueNames(Part_1_doc)
 
+model.removeTmpFile(filename)
+
 assert(model.checkPythonDump())
index 20db0466f58806f2a198d43c28d40aae8cf83857..d160136f63b8fa7f2855e539270cbaba9d992057 100644 (file)
@@ -87,6 +87,8 @@ Part_1_doc = Part_1.document()
 model.importPart(Part_1_doc, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # Test 1. No new Part should be created
 assert(partSet.size(ModelAPI_ResultPart.group()) == 1)
 
index b0f2a13b248e4f2de8cd91c2d39d7ab0cfe985b0..990419f726cb340c9d7fd68035aeef0326e1db9d 100644 (file)
@@ -85,6 +85,8 @@ partSet = model.moduleDocument()
 model.importPart(partSet, filename)
 model.end()
 
+model.removeTmpFile(filename)
+
 # Test 1. New Part should be created
 assert(partSet.size(ModelAPI_ResultPart.group()) == 1)
 newPart = modelAPI_ResultPart(objectToResult(partSet.object(ModelAPI_ResultPart.group(), 0)))
index 1e5132e1118e45c8b056b7c9f6115c6869029d65..0a0c7aa893bfaccc93f254913332132de3f1ed4d 100644 (file)
@@ -74,6 +74,7 @@ def checkPythonDump(theDumpMode = CHECK_NAMING_AND_GEOMETRICAL):
   aGeo  = aPrefix + "_geo.py"
   aWeak = aPrefix + "_weak.py"
   isOk = checkPyDump(aNaming, aGeo, aWeak, theDumpMode)
+  removeTmpFile(aPrefix)
   removeTmpFile(aNaming)
   removeTmpFile(aGeo)
   removeTmpFile(aWeak)