]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #761 - Check and error for unique parameter name -- Fix tests
authorspo <sergey.pokhodenko@opencascade.com>
Wed, 22 Jul 2015 13:23:37 +0000 (16:23 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Wed, 22 Jul 2015 13:24:04 +0000 (16:24 +0300)
src/ParametersPlugin/Test/TestParameterChangeValue.py
src/ParametersPlugin/Test/TestParameterRename.py

index cfc99c2627f812f39e4b809b33dbb52337017fe4..4e810d765ac3be7cf8b10a32e1b53248e5ceb68e 100644 (file)
@@ -51,15 +51,15 @@ class TestParameterRename(unittest.TestCase):
         ltNames = ["x1", "y1", "x2"]
         ltExpressions = ["150.", "200.", "x1 + y1 + 100.0"]
         self.dtParams = {}
-        self.aSession.startOperation()
         for name, expr in zip(ltNames, ltExpressions):
+            self.aSession.startOperation()
             aParam = self.aDocument.addFeature("Parameter")
             aParamName = aParam.string("variable")
             aParamName.setValue(name)
             aParamExpr = aParam.string("expression")
             aParamExpr.setValue(expr)
             self.dtParams[name] = aParam
-        self.aSession.finishOperation()
+            self.aSession.finishOperation()
         self.assertEqual(len(self.dtParams), len(ltNames))
 
         aParam = self.dtParams["x2"]
index ef8bd2e6bca64c0ba2052ab48fd63fb5bb153729..5521426308a481a6ae59758b712fe18dc300e320 100644 (file)
@@ -53,15 +53,15 @@ class TestParameterRename(unittest.TestCase):
         ltNames = ["x1", "y1", "x2"]
         ltExpressions = ["150.", "200.", "x1 + y1 + 100.0"]
         self.dtParams = {}
-        self.aSession.startOperation()
         for name, expr in zip(ltNames, ltExpressions):
+            self.aSession.startOperation()
             aParam = self.aDocument.addFeature("Parameter")
             aParamName = aParam.string("variable")
             aParamName.setValue(name)
             aParamExpr = aParam.string("expression")
             aParamExpr.setValue(expr)
             self.dtParams[name] = aParam
-        self.aSession.finishOperation()
+            self.aSession.finishOperation()
         self.assertEqual(len(self.dtParams), len(ltNames))
 
         aParam = self.dtParams["x2"]