From: spo Date: Wed, 22 Jul 2015 13:23:37 +0000 (+0300) Subject: Issue #761 - Check and error for unique parameter name -- Fix tests X-Git-Tag: V_1.4.0_beta4~454 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a329e6de49c77eb55d2eff09b27ab71d497065c5;p=modules%2Fshaper.git Issue #761 - Check and error for unique parameter name -- Fix tests --- diff --git a/src/ParametersPlugin/Test/TestParameterChangeValue.py b/src/ParametersPlugin/Test/TestParameterChangeValue.py index cfc99c262..4e810d765 100644 --- a/src/ParametersPlugin/Test/TestParameterChangeValue.py +++ b/src/ParametersPlugin/Test/TestParameterChangeValue.py @@ -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"] diff --git a/src/ParametersPlugin/Test/TestParameterRename.py b/src/ParametersPlugin/Test/TestParameterRename.py index ef8bd2e6b..552142630 100644 --- a/src/ParametersPlugin/Test/TestParameterRename.py +++ b/src/ParametersPlugin/Test/TestParameterRename.py @@ -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"]