]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Use temporary name of exported file in tests related to Part's export/import
authoresy <emmanuel.streby@opencascade.com>
Mon, 8 Nov 2021 16:08:11 +0000 (17:08 +0100)
committerazv <azv@opencascade.com>
Tue, 9 Nov 2021 08:39:39 +0000 (11:39 +0300)
30 files changed:
src/ExchangePlugin/Test/TestExportPart_Failure_1.py
src/ExchangePlugin/Test/TestExportPart_Failure_2.py
src/ExchangePlugin/Test/TestExportPart_Failure_3.py
src/ExchangePlugin/Test/TestExportPart_FullPartSet.py
src/ExchangePlugin/Test/TestExportPart_FullPart_1.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_4.py
src/ExchangePlugin/Test/TestExportPart_Results_5.py
src/ExchangePlugin/Test/TestExportPart_Results_6.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

index ce36e40267c15a032c0e6cb5d386d7976e008fe8..ea3e0be53be0b2838e27bd014edac552ffcbfd9a 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 model.begin()
 model.exportPart(partSet, filename, [Part_1.result()])
index 75fbcb896967d27f1291adc5b3e743fd58a15124..2be17e0270db1b5ead09ccabf66d935c48bad2f2 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Box_1
 
index d24a81936d7dbb6724635686fbe0c51167447823..d30e0d4876981ed17abf632551b1f4137b16c044 100644 (file)
@@ -31,8 +31,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 model.begin()
 model.exportPart(partSet, filename)
index 0f6bfa2f9ccacc373d95d70312b3da0c3b93614d..62abbfed218762bf1ad6dcb9985989de89791d6c 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 model.begin()
 model.exportPart(partSet, filename)
index 8c48bb60ca16846f715a58582e3734028828e0e9..e4189a3f932e7afec0858f6464ed11615f999a1f 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 model.begin()
 model.exportPart(Part_1_doc, filename)
index 060ee5d622306e9a35472b6ff1c4ed13ea728cca..fdbeaa255ec3619f4e17692b5d8b02a6adb7dc27 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 model.begin()
 model.exportPart(Part_2_doc, filename)
index 09a8528cc2daa3762dc8ccb2bf9142a409fe0f0c..3cbf5e4462b2664398c9257a4bf6313b5877e83b 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 model.begin()
 model.exportPart(partSet, filename, [Axis_4.result()])
index 831f36e968fdfcae08a58247d926734f6cdf7471..be9916fad62d275869d705e7998cf5f5b0f31eb5 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Point_2
 
index 491d35b18250d9066112e74dfa26e97396a711b6..317303b6176f6ded09c53e86c564f6318b423e57 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Axis_4
 
index 591a87670b6caf52ab88a84d9def8c1dd7cc575b..e31c03104375dfddcbf787dc7ea4309660c7ba3a 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Sketch_1
 
index c2b94262f96bf95fd4e6aaa64098cf4ee0514a74..d8b01a6db4b762b13caf658a24eac0e28d943979 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Extrusion_1
 
index da6be87791d06c1536089116e93ad52cab5f030f..db5a4a6e0c5625a07c86ad333059ffedc7fdb986 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Sketch_2
 
index 924bb362e68c8a7dab3d19d13288cf9b0b0fbfeb..d81ae61e5faab127c943c2c98c251f7ab50a7486 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Revolution_1
 
index 5debe9bfc5c59da57b0bca56874632ae313ec187..9a5ac4ec4dc3e8cdc0fb570695c9a2c4fab54f89 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Box_1
 
index 869cd936b67755d830131e2fe43dde45cef39d0f..0db5a9042b9f7d13582100caa8069508454800bf 100644 (file)
@@ -63,8 +63,8 @@ model.end()
 
 import os
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Translation_1
 
index 2521fdfe4edd0fbd7757e1b034dfe0d38585438e..5e67113b6c983c090ce1a6b147ea57aa1f5d6540 100644 (file)
@@ -34,8 +34,8 @@ Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), mod
 model.do()
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # store the reference data
 features = Part_1_doc.allFeatures()
index 5742c570feef9da8e9e55606103d688ee768b6be..5d79c5b24ce180b30762219bf0e3f7c5a070522c 100644 (file)
@@ -34,8 +34,8 @@ Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), mod
 model.do()
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # store the reference data
 features = Part_1_doc.allFeatures()
index 8bc87e142efb3881ed08e1b2ea08742afbf9b400..14acc7ec01de094a4a18e4ffc20d4c4382f3b8a4 100644 (file)
@@ -64,8 +64,8 @@ model.do()
 
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # store the reference data
 features = [Point_2.feature(), Axis_4.feature()]
index dd901e42b66d974556595e5650f58260703e3dce..40cb64c4358c05cd5893e730a32674643cccf5bc 100644 (file)
@@ -65,8 +65,8 @@ model.do()
 
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Sketch_1
 
index 415b5fee4c89d89a0897182aacf2a7e45d0702c9..ce5057a16e395d8e37b31ce9cf062ffc692991cc 100644 (file)
@@ -64,8 +64,8 @@ model.do()
 
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Box_1
 
index cb6a8cc7c38ea3e61c903ff5dd032666ab040e95..ae305fc72c2afe9255ce9e4b79af2366df20f4f2 100644 (file)
@@ -64,8 +64,8 @@ model.do()
 
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 featureToExport = Translation_1
 
index dd6d91d7cec19a2636ecdc28f038313d009f1157..6c381dac274082c6a64db01f90f13fd250dab8b1 100644 (file)
@@ -65,8 +65,8 @@ model.do()
 
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # store the reference data
 features = [Box_1.feature(), Plane_4.feature()]
index 45f6ac8628806e2a6008c2402fd8977a0cacf8ab..139022dc8a448d95759157207eaffc932f4b1250 100644 (file)
@@ -65,8 +65,8 @@ model.do()
 
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # store the reference data
 features = [Box_1.feature(), Translation_1.feature()]
index 7b851bdce43dcd72295d2f3e57fb3933f01becd8..a6920f31990fa0211b2dbc4b1c70d5a59c6f463d 100644 (file)
@@ -49,8 +49,8 @@ for feat in features:
         res.append(GeomAlgoAPI_ShapeTools.volume(r.shape()))
     refData.append( (feat.getKind(), res) )
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # emport the document
 model.begin()
index acb76f9ec5bbc8e8106ee9835073cb228785e9b0..0ccd9504e199fe01524491b0ebf36ab177125310 100644 (file)
@@ -51,8 +51,8 @@ for feat in features:
         res.append(GeomAlgoAPI_ShapeTools.volume(r.shape()))
     refData.append( (feat.getKind(), res) )
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # emport the document
 model.begin()
index 08fbef03657b228a4f99a18771a6430586ab213d..f73fa94a3590740cd6193e13307f248a3381171b 100644 (file)
@@ -51,8 +51,8 @@ for feat in features:
         res.append(GeomAlgoAPI_ShapeTools.volume(r.shape()))
     refData.append( (feat.getKind(), res) )
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # emport the document
 model.begin()
index 642a15443bbbb0dd0bbbfea8cca4fb4298950d44..b9394c249e195c3bd35566d943b1da2a8d103eea 100644 (file)
@@ -51,8 +51,8 @@ for feat in features:
         res.append(GeomAlgoAPI_ShapeTools.volume(r.shape()))
     refData.append( (feat.getKind(), res) )
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # emport the document
 model.begin()
index 8ba713cc1c1e2daca23b89f2436b301ca2a2194f..9227c81d4f00572bf2c2d633240a3a4043b28011 100644 (file)
@@ -36,8 +36,8 @@ Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), mod
 model.do()
 model.end()
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # export all features from Part_1
 model.begin()
index b314bd387c0f688b7fdc7365594f68cc28a817fa..0adc587175d87c90a6f436850c855d0d3e357d6c 100644 (file)
@@ -67,8 +67,8 @@ for feat in features:
         res.append(GeomAlgoAPI_ShapeTools.volume(r.shape()))
     refData.append( (feat.getKind(), res) )
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # emport the document
 model.begin()
index 5a3bd8549e120b90d7192d7b89ccf40bfa0ed047..89e124e4ca1d0b2e26fd70c1df5537181bc371cb 100644 (file)
@@ -67,8 +67,8 @@ for feat in features:
         res.append(GeomAlgoAPI_ShapeTools.volume(r.shape()))
     refData.append( (feat.getKind(), res) )
 
-filename = 'check_export.shaperpart'
-model.removeFile(filename)
+filename = model.getTmpFileName('check_export', '.shaperpart')
+model.removeTmpFile(filename)
 
 # emport the document
 model.begin()