]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update of testImport
authorJérôme <jerome.lucas@cesgenslab.fr>
Mon, 12 Oct 2020 10:16:53 +0000 (12:16 +0200)
committerJérôme <jerome.lucas@cesgenslab.fr>
Mon, 12 Oct 2020 10:16:53 +0000 (12:16 +0200)
src/ExchangePlugin/Test/TestImport.py

index a4895e081e9eac8a007988e201fac249db8fdb13..c7d16a45318a5be5abc6109b2a844c1c25ece57d 100644 (file)
@@ -54,10 +54,23 @@ def testImport(theType, theFile, theVolume, theDelta, theErrorExpected = False):
     aFeatureKind = "Import"
     anImportFeature = aPart.addFeature(aFeatureKind)
     assert anImportFeature, "{0}: Can not create a feature {1}".format(theType, aFeatureKind)
+    if theType == "STP" or theType == "STEP":
+        aFieldName = "step_file_path"  
+        file = anImportFeature.string(aFieldName)
+        assert file, "{0}: Can not receive string field {1}".format(theType, aFieldName)
+        file.setValue(theFile)
+        aFieldName = "step_scale_inter_units"
+        units = anImportFeature.boolean(aFieldName)
+        assert units, "{0}: Can not receive string field {1}".format(theType, aFieldName)
+        units.setValue(True)
     aFieldName = "file_path"
     file = anImportFeature.string(aFieldName)
     assert file, "{0}: Can not receive string field {1}".format(theType, aFieldName)
     file.setValue(theFile)
+    aFieldName = "ImportType"
+    type = anImportFeature.string(aFieldName)
+    assert type, "{0}: Can not receive string field {1}".format(theType, aFieldName)
+    type.setValue(theType)
     aSession.finishOperation()
 
     if theErrorExpected:
@@ -86,6 +99,9 @@ def testImportXAO():
     aSession.startOperation("Import XAO")
     anImportFeature = aPart.addFeature("Import")
     anImportFeature.string("file_path").setValue(getShapePath("Xao/box1.xao"))
+    aFieldName = "ImportType"
+    type = anImportFeature.string(aFieldName)
+    type.setValue("XAO")
     aSession.finishOperation()
 
     # Check results