]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix tests fot ExchangePlugin
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 23 Jun 2016 06:40:10 +0000 (09:40 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 23 Jun 2016 06:40:10 +0000 (09:40 +0300)
src/ExchangeAPI/Test/TestExchange.py
src/ExchangePlugin/Test/TestExport.py
src/ExchangePlugin/Test/TestImport.py
src/ExchangePlugin/plugin-Exchange.xml
src/PythonAPI/Test/TestFeatures.py

index 0e73c2dcf9d9e8dff56f66dfb1c7fb146c7bb9dc..681688fa1f06482bf958bca552991e6a13435bbd 100644 (file)
@@ -19,7 +19,7 @@ class ExchangeTestCase(unittest.TestCase):
 
     def test_addExport(self):
         self.session.startOperation()
-        self.feature = ExchangeAPI.exportToFile(self.doc, "file_path", "file_format", [])
+        self.feature = ExchangeAPI.exportToFile(self.doc, "file_path", [], "file_format")
         self.session.finishOperation()
 
 if __name__ == "__main__":
index 554ee8066ebcf9e492388e1bd6196b42f6445249..2f8d4144b2507e21626afb73dc015a250ec8978f 100644 (file)
@@ -9,9 +9,6 @@ import os
 import math
 
 from ModelAPI import *
-from GeomDataAPI import *
-from GeomAlgoAPI import *
-from GeomAPI import *
 
 from TestImport import testImport
 
index 6b986c2727f34761d3bcff1db69e884c7ed572e4..5a07ad66a303545ba3641ed6b5d06225c23338e1 100644 (file)
@@ -6,10 +6,7 @@
 # Initialization of the test
 #=========================================================================
 from ModelAPI import *
-from GeomDataAPI import *
 from GeomAlgoAPI import *
-from GeomAPI import *
-import os
 import math
 
 __updated__ = "2015-05-22"
@@ -73,8 +70,8 @@ def testImportXAO():
     assert aFeature1.getKind() == "Group"
     assert aFeature1.name() == "boite_1"
 
-    aSelectionList = aFeature1.selectionList("group_list") 
-    assert aSelectionList.selectionType() == "Solids"
+    aSelectionList = aFeature1.selectionList("group_list")
+    assert aSelectionList.selectionType() == "solid"
     assert aSelectionList.size() == 1
     assert aSelectionList.value(0).namingName("") == "mygeom_1_1"
 
@@ -83,7 +80,7 @@ def testImportXAO():
     assert aFeature2.name() == "Group_2"
 
     aSelectionList = aFeature2.selectionList("group_list") 
-    assert aSelectionList.selectionType() == "Faces"
+    assert aSelectionList.selectionType() == "face"
     assert aSelectionList.size() == 2
     assert aSelectionList.value(0).namingName("") == "mygeom_1/Shape1_1"
     assert aSelectionList.value(1).namingName("") == "mygeom_1/Shape2_1"
index 9555ff2ee0fb4749efcc5d08d9e25adace1039e2..eeafa5b9587372684607384524dc4f7dcd2d04d3 100755 (executable)
@@ -5,7 +5,7 @@
     <group id="Exchange">
       <feature id="Import" title="Import" tooltip="Import a file" icon="icons/Exchange/import.png" document="Part">
         <file_selector id="file_path" title="Import file" path="">
-          <validator id="ExchangePlugin_ImportFormat" parameters="BREP|BRP:BREP,STEP|STP:STEP,IGES|IGS:IGES" />
+          <validator id="ExchangePlugin_ImportFormat" parameters="BREP|BRP:BREP,STEP|STP:STEP,IGES|IGS:IGES,XAO:XAO" />
         </file_selector>
       </feature>
       <feature id="Export" title="Export" tooltip="Export to file" icon="icons/Exchange/export.png">
index f4ef8e423fbfdd9931b540ca86fbaf5c330fc612..d991e3e13ec933f0e7acaa59013021182e99d56e 100644 (file)
@@ -59,7 +59,6 @@ class FeaturesTestCase(FeaturesFixture):
 
         import ExchangeAPI
         ExchangeAPI.ExchangeAPI_Import(self.part.addFeature("Import"))
-        ExchangeAPI.ExchangeAPI_Export(self.part.addFeature("Export"))
 
         import FeaturesAPI
         FeaturesAPI.FeaturesAPI_Boolean(self.part.addFeature("Boolean"))