Salome HOME
Added python dump checking for every unit test where it is useful.
authormpv <mpv@opencascade.com>
Fri, 12 Aug 2016 16:44:30 +0000 (19:44 +0300)
committermpv <mpv@opencascade.com>
Fri, 12 Aug 2016 16:44:30 +0000 (19:44 +0300)
85 files changed:
src/BuildPlugin/Test/TestEdge.py
src/BuildPlugin/Test/TestFace.py
src/BuildPlugin/Test/TestShell.py
src/BuildPlugin/Test/TestSubShapes.py
src/BuildPlugin/Test/TestVertex.py
src/BuildPlugin/Test/TestWire.py
src/ConstructionAPI/Test/TestAxis.py
src/ConstructionAPI/Test/TestPoint.py
src/ConstructionPlugin/Test/TestAxisCreation.py
src/ConstructionPlugin/Test/TestPlane.py
src/ConstructionPlugin/Test/TestPoint.py
src/ConstructionPlugin/Test/TestPointName.py
src/ConstructionPlugin/Test/UnitTestAxis.py
src/ExchangeAPI/Test/TestExchange.py
src/ExchangePlugin/Test/TestExport.py
src/ExchangePlugin/Test/TestImport.py
src/FeaturesPlugin/Test/TestBoolean.py
src/FeaturesPlugin/Test/TestBooleanCompSolids.py
src/FeaturesPlugin/Test/TestBooleanFill.py
src/FeaturesPlugin/Test/TestBooleanSmash.py
src/FeaturesPlugin/Test/TestCompositeFeaturesOnCompSolids.py
src/FeaturesPlugin/Test/TestExtrusion.py
src/FeaturesPlugin/Test/TestExtrusionCut.py
src/FeaturesPlugin/Test/TestExtrusionFuse.py
src/FeaturesPlugin/Test/TestGroup.py
src/FeaturesPlugin/Test/TestIntersection.py
src/FeaturesPlugin/Test/TestMultiBoolean.py
src/FeaturesPlugin/Test/TestPartition.py
src/FeaturesPlugin/Test/TestPipe.py
src/FeaturesPlugin/Test/TestPlacement.py
src/FeaturesPlugin/Test/TestRecover.py
src/FeaturesPlugin/Test/TestRemoveSubShapes.py
src/FeaturesPlugin/Test/TestRevolution.py
src/FeaturesPlugin/Test/TestRevolutionCut.py
src/FeaturesPlugin/Test/TestRevolutionFuse.py
src/FeaturesPlugin/Test/TestRotation.py
src/FeaturesPlugin/Test/TestSerialBoolean.py
src/FeaturesPlugin/Test/TestTranslation.py
src/FeaturesPlugin/Test/TestUnion.py
src/ModelAPI/Test/Test1064.py
src/ModelAPI/Test/Test1512.py
src/ModelAPI/Test/TestDocument.py
src/ModelAPI/Test/TestDoubleArray.py
src/ModelAPI/Test/TestIntArray.py
src/ModelAPI/Test/TestResults.py
src/ModelAPI/Test/TestUndoRedo.py
src/ModelGeomAlgo/Test/TestPoint2D.py
src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ParametersPlugin/Test/TestParameterChangeValue.py
src/ParametersPlugin/Test/TestParameterCreation.py
src/ParametersPlugin/Test/TestParameterRename.py
src/PythonAPI/Test/TestFeatures.py
src/PythonAPI/Test/TestFeaturesExtrusion.py
src/PythonAPI/Test/TestFeaturesRevolution.py
src/PythonAPI/Test/TestModel.py
src/PythonAPI/Test/TestSketcher.py
src/PythonAPI/examples/MakeBrick1.py
src/PythonAPI/examples/MakeBrick2.py
src/PythonAPI/examples/MakeBrick3.py
src/PythonAPI/examples/Platine.py
src/SketchPlugin/Test/TestConstraintAngle.py
src/SketchPlugin/Test/TestConstraintCoincidence.py
src/SketchPlugin/Test/TestConstraintCollinear.py
src/SketchPlugin/Test/TestConstraintDistance.py
src/SketchPlugin/Test/TestConstraintEqual.py
src/SketchPlugin/Test/TestConstraintHorizontal.py
src/SketchPlugin/Test/TestConstraintLength.py
src/SketchPlugin/Test/TestConstraintMiddlePoint.py
src/SketchPlugin/Test/TestConstraintMirror.py
src/SketchPlugin/Test/TestConstraintParallel.py
src/SketchPlugin/Test/TestConstraintPerpendicular.py
src/SketchPlugin/Test/TestConstraintRadius.py
src/SketchPlugin/Test/TestConstraintRigid.py
src/SketchPlugin/Test/TestConstraintTangent.py
src/SketchPlugin/Test/TestConstraintVertical.py
src/SketchPlugin/Test/TestFillet.py
src/SketchPlugin/Test/TestHighload.py
src/SketchPlugin/Test/TestMultiRotation.py
src/SketchPlugin/Test/TestMultiTranslation.py
src/SketchPlugin/Test/TestProjection.py
src/SketchPlugin/Test/TestRectangle.py
src/SketchPlugin/Test/TestSketchArcCircle.py
src/SketchPlugin/Test/TestSketchPointLine.py
src/SketchPlugin/Test/TestSnowflake.py

index 5c5ebb590c87ed3ea28a670170099b363f630813..648aa57d8208189781516ad99aaab76aa62eb8f6 100644 (file)
@@ -54,3 +54,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(anEdgeFeature.results()) == aNumOfLines)
+
+import model
+assert(model.checkPythonDump())
index bd85a3a61717f53ba645f13d8ab314f3d3bc658f..9f4b9e8281aec7ccc952247a9152e581dc3cefad 100644 (file)
@@ -62,3 +62,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(aFaceFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
index cd06246f1568b7188797a2787d8dc893f5c09f10..2406a93b51bf87a296cfbe5d31eceda085a29786 100644 (file)
@@ -77,3 +77,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(aShellFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
index 59668662c84ff151a26f3936770d550b03212f02..e943f66b3752733c6d701583fa7aaf583092f8cc 100644 (file)
@@ -126,3 +126,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(aSubShapesFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
index cc2da7929bd025ed769cba6311e9f467f235640c..d292e6aafd568124430f16c3d8eea192f4bf74e0 100644 (file)
@@ -55,3 +55,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(aVertexFeature.results()) == aNumOfPoints)
+
+import model
+assert(model.checkPythonDump())
index 9b50b70ee5ce15866371dc6826bd7aefafcf2bdd..545c5ffa6e5aea22278c95e90c03f95b9cd0a487 100644 (file)
@@ -62,3 +62,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(aWireFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
index 626ff62b76924566020f5df9da1cbc0db232629a..ddce019986744cce1816df5fe1cf39d3bb893bcf 100644 (file)
@@ -2,6 +2,7 @@ import unittest
 
 import ModelAPI
 import ConstructionAPI
+import model
 
 class AxisTestCase(unittest.TestCase):
 
@@ -14,6 +15,7 @@ class AxisTestCase(unittest.TestCase):
         self.session.finishOperation()
 
     def tearDown(self):
+        assert(model.checkPythonDump())
         self.session.closeAll()
 
     def test_ConstructorWithDimensions(self):
index a1bc2eca78e2292a5bcccf7af74e8ec857950ffc..e2da3460aa235e6e14f9e4c2d135c671e332f692 100644 (file)
@@ -2,6 +2,7 @@ import unittest
 
 import ModelAPI
 import ConstructionAPI
+import model
 
 class PointTestCase(unittest.TestCase):
 
@@ -14,6 +15,7 @@ class PointTestCase(unittest.TestCase):
         self.session.finishOperation()
 
     def tearDown(self):
+        assert(model.checkPythonDump())
         self.session.closeAll()
 
     def test_ConstructorWithValues(self):
index 86ce8bc3771f001a72de3916b8147e34a8820052..77be60ef1dfd48437eaa6c99291f36eb806c3af3 100644 (file)
@@ -188,3 +188,6 @@ aSession.startOperation()
 anAxis = model.addAxis(aPart, aPlane1.result()[0], 50, False, aPlane2.result()[0], 100, True)
 aSession.finishOperation()
 assert (len(anAxis.result()) > 0)
+
+#import model
+#assert(model.checkPythonDump())
index 0661b4dd3e7589f6613d0bbbebfe58a8f7da726b..3a3b7c862d2fc2149fb0bdfb70c9a062bf835427 100644 (file)
@@ -82,3 +82,6 @@ aSession.startOperation()
 aPlane = model.addPlane(aDocument, aCoincidentPlane.result()[0], aPlane.result()[0])
 aSession.finishOperation()
 assert (len(aPlane.result()) > 0)
+
+import model
+assert(model.checkPythonDump())
index 4afd7f2b9ef0595466ffdbbf911d8638b9498d63..d91d746345f18923b8fb934fcffdfa7ec5b822d1 100644 (file)
@@ -61,4 +61,4 @@ assert (len(aPoint.result()) > 0)
 # aSession.finishOperation()
 # assert (len(aPoint.result()) > 0)
 
-assert(model.checkPythonDump())
\ No newline at end of file
+assert(model.checkPythonDump())
index fcf606b054c6a19baaf45a188115f1c1f11a77eb..9d17c2294d5427a10122ef646de6a2144a3f1243 100644 (file)
@@ -20,3 +20,6 @@ aFeature1 = aDoc.object("Construction", 7)
 aFeature1Name = aFeature1.data().name()
 
 assert (aFeatureName == aFeature1Name)
+
+import model
+assert(model.checkPythonDump())
index 845dcef37b7f27fa03aa0acd520c8f7881c1e130..9dbb8c8fc491261fbe7f364965eb84298138d4a2 100644 (file)
@@ -74,3 +74,6 @@ aSession.finishOperation()
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 681688fa1f06482bf958bca552991e6a13435bbd..d7cc004be2f64995b61a94c1f3059a7ee982dcd6 100644 (file)
@@ -2,6 +2,7 @@ import unittest
 
 import ModelAPI
 import ExchangeAPI
+import model
 
 class ExchangeTestCase(unittest.TestCase):
 
@@ -10,6 +11,7 @@ class ExchangeTestCase(unittest.TestCase):
         self.doc = self.session.moduleDocument()
 
     def tearDown(self):
+        assert(model.checkPythonDump())
         self.session.closeAll()
 
     def test_addImport(self):
index a8113e799147bec5d025f4f5874457717bab0476..d167177bdd052a40c2d5898b888496f6fe1c0a7d 100644 (file)
@@ -145,3 +145,5 @@ if __name__ == '__main__':
 #=========================================================================
 # End of test
 #=========================================================================
+
+assert(model.checkPythonDump())
index 5a07ad66a303545ba3641ed6b5d06225c23338e1..0dbffdea69f9e85dd709510b5f1f7b8f96838365 100644 (file)
@@ -108,3 +108,6 @@ if __name__ == '__main__':
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index c83eb2f2b54816da15651c3ada20dfab72c5d604..c1b686df978e6efda244a5fd791cf81081ff47a6 100644 (file)
@@ -118,3 +118,6 @@ assert (aBooleanResult is not None)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index ed2a6051456413a4072cf233258a0d01a1b2671b..8d997e60ecb747a8516bf6445d8e63da72d433b4 100644 (file)
@@ -128,3 +128,6 @@ assert (aBooleanResult is not None)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 26caead92fe1b5237149b15733c51da1a6470ffc..524286a3511b6501124cf5dc40cccb6c73dc3f8e 100644 (file)
@@ -43,3 +43,5 @@ aSession.startOperation()
 aBoolean = model.addFill(aDocument, [anExtrusion.result()[0]], [anExtrusion.result()[1]])
 assert (len(aBoolean.result()) > 0)
 aSession.finishOperation()
+
+assert(model.checkPythonDump())
index 8591f52d0ce1ea731a7f87233e9f2230f29cf6fd..2190346cffbae2dedde442cbb757f9a8638a902f 100644 (file)
@@ -102,3 +102,6 @@ assert (aBooleanResult is not None)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 1f9f97c49b62d8f7c2292fc359be9ee1c8435c75..0e556e5fa0428faef7b0613fa4bd1b616003fd86 100644 (file)
@@ -224,3 +224,6 @@ assert (aFactory.validate(anRevolutionFuseFt))
 assert (len(anRevolutionFuseFt.results()) > 0)
 aCurrentResult = modelAPI_ResultBody(anRevolutionFuseFt.firstResult())
 assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
index 9a5c6d784e084f088b198fd9716c410631fba886..ea08653101f30fea67d00aea923fa2fa2bd51b52 100644 (file)
@@ -245,3 +245,6 @@ assert (anExtrusionResult is not None)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index e880babc7ae0175483d4715cdde64d6658fc44ef..72a536f984dd4b3c654302f698ce960a437d0325 100644 (file)
@@ -117,3 +117,6 @@ assert (aFactory.validate(anExtrusionCutFt))
 assert (len(anExtrusionCutFt.results()) > 0)
 aCurrentResult = modelAPI_ResultBody(anExtrusionCutFt.firstResult())
 assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
index 5832c3baa7881838e224a7da6512d333703ac009..e57883994301b8bd3aea5339aa5de54784346dbc 100644 (file)
@@ -117,3 +117,6 @@ assert (aFactory.validate(anExtrusionFuseFt))
 assert (len(anExtrusionFuseFt.results()) > 0)
 aCurrentResult = modelAPI_ResultBody(anExtrusionFuseFt.firstResult())
 assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
index a2ca95ef1fe76a702c61531c304c3f75a00a2368..139d41208c84a86e524ce2b3f75bcb0108356343 100644 (file)
@@ -242,3 +242,6 @@ assert(aGroupResult.shape())
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 04490b0f7252b19d5e0a9f1a3c0a58881deac7f8..2915cff8671449c280dc9e2de5216386a0b561e6 100644 (file)
@@ -146,3 +146,6 @@ assert (aFactory.validate(anIntersectionFt))
 assert (len(anIntersectionFt.results()) > 0)
 anItersectionResult = modelAPI_ResultBody(anIntersectionFt.firstResult())
 assert (anItersectionResult is not None)
+
+import model
+assert(model.checkPythonDump())
index 65ca076f16edf1b96f33262a8bd0fadb24cc9578..b6a6e742cba94fc89c79b54b69d1c992c258d0d4 100644 (file)
@@ -192,3 +192,6 @@ aSession.finishOperation()
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index db00eaeeffde8132f605ba0e91ae87a8d75ebdd7..dbc14ed948dbd49706de3997e97ee3d9f6f9cf84 100644 (file)
@@ -129,3 +129,6 @@ assert (aFactory.validate(aPartitionFt))
 assert (len(aPartitionFt.results()) > 0)
 aPartitionResult = modelAPI_ResultBody(aPartitionFt.firstResult())
 assert (aPartitionResult is not None)
+
+import model
+assert(model.checkPythonDump())
index 5623aa59419148e8d8d6e89da7c21894f7adae2a..5cd9a2b9a3cf475128341c521ce94f69cb527a1b 100644 (file)
@@ -163,3 +163,6 @@ aSession.finishOperation()
 
 # Test results
 assert (len(aPipeFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
index 58e328fa95c3fadd3a42f9a6036bac49ebce5865..24619f2173e747a6fa6d278d8d3e81e1a3ec771a 100644 (file)
@@ -217,3 +217,6 @@ aSession.finishOperation()
 assert (len(aPlacementFt.results()) > 0)
 aPlacementResult = modelAPI_ResultBody(aPlacementFt.firstResult())
 assert (aPlacementResult is not None)
+
+import model
+assert(model.checkPythonDump())
index 28a47fc83f2af54ccce154d03fb427c6234aa9f8..867ecc32fb8c9fd2e6976719303f3a3068f22381 100644 (file)
@@ -64,3 +64,5 @@ recover.setIsPersistent(False)
 model.end()
 # only two booleans
 assert(mypart.size("Bodies") == 2)
+
+assert(model.checkPythonDump())
index 6685760da35ddf022beb74a2db7344e42eaf17a3..713e7e94e3bbc3bff8b12520ac553756ebffa4e6 100644 (file)
@@ -72,3 +72,6 @@ aSession.finishOperation()
 assert (len(aRemoveSubShapesFeature.results()) > 0)
 anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aRemoveSubShapesFeature.firstResult()))
 assert (anUnionResult.numberOfSubs() == 2)
+
+import model
+assert(model.checkPythonDump())
index 3f46da758957cd3386b72b2a47f1d5c330f40d3f..cfac07013495388e06287617ebf342503e1c79a3 100644 (file)
@@ -206,3 +206,6 @@ aSession.finishOperation()
 assert (len(aRevolFt.results()) > 0)
 aRevolResult = modelAPI_ResultBody(aRevolFt.firstResult())
 assert (aRevolResult is not None)
+
+import model
+assert(model.checkPythonDump())
index ca8f2b57b57010d2d1eb2f2b65bb350ecdf4080b..6ec4eb3b584c37d659c5273b2745d5f96842e4df 100644 (file)
@@ -144,3 +144,6 @@ assert (aFactory.validate(anRevolutionCutFt))
 assert (len(anRevolutionCutFt.results()) > 0)
 aCurrentResult = modelAPI_ResultBody(anRevolutionCutFt.firstResult())
 assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
index 369c413a0b8accb156e5a4e24730f1c8a20f944c..807a4d4430d57cf14fcd23e360ce14cabbade237 100644 (file)
@@ -172,3 +172,6 @@ assert (aFactory.validate(anRevolutionFuseFt))
 assert (len(anRevolutionFuseFt.results()) > 0)
 aCurrentResult = modelAPI_ResultBody(anRevolutionFuseFt.firstResult())
 assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
index e86b7b8e92502946d177b72f64172cea5262242e..9cd1479c529c41cdf69117c0404122d11963e085 100644 (file)
@@ -132,3 +132,5 @@ assert (len(aRotateFt.results()) > 0)
 aMoveResult = modelAPI_ResultBody(aRotateFt.firstResult())
 assert (aMoveResult is not None)
 
+import model
+assert(model.checkPythonDump())
index ce9fa673474e020385339392a5cce9c49b08e99a..9b248edcc789397da16b601d3b62dae1b05321fa 100644 (file)
@@ -192,3 +192,6 @@ aSession.finishOperation()
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index dd90e09ea0724a63f961530230a663f1264a5ada..820b72c62c8753afb7a36868ac5d6c538c743565 100644 (file)
@@ -132,3 +132,5 @@ assert (len(aMoveFt.results()) > 0)
 aMoveResult = modelAPI_ResultBody(aMoveFt.firstResult())
 assert (aMoveResult is not None)
 
+import model
+assert(model.checkPythonDump())
index 562645c4241bbd77f1d18b46560f07a7a8d50cbf..eb4be902a064e7c82d03704e089b6d9414323f24 100644 (file)
@@ -73,3 +73,6 @@ aSession.finishOperation()
 assert (len(aUnionFeature.results()) > 0)
 anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aUnionFeature.firstResult()))
 assert (anUnionResult.numberOfSubs() == 0)
+
+import model
+assert(model.checkPythonDump())
index efd57540f94c848aca85c6707da89cb253fa8510..4f433271e34bc6ad4bb2f6d03df52ae7c8512509 100644 (file)
@@ -105,3 +105,6 @@ assert(aPln.direction().z() == 0.)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 25f843acf37e3313c333acdaead8a175c4502b5f..491061c9be2b6d83c838351296654d1e2c36171a 100755 (executable)
@@ -149,3 +149,6 @@ assert(aFuse.firstResult().shape().isConnectedTopology() == False)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 14bf232bb49471b50036ce6d386266be157335fc..7ff8a94505c6816b7c53ba99f7d49a111607695d 100644 (file)
@@ -88,3 +88,6 @@ aDoc2.addFeature("Remove")
 aSession.finishOperation()
 assert(aSession.moduleDocument().size("Parts") == 0)
 assert(aSession.activeDocument())
+
+import model
+assert(model.checkPythonDump())
index 88a1099c20e7241515a50d8bf511e82f43c4ec48..f546ea4a9e4bb77d0e41d296f5ad9f4057b4684f 100644 (file)
@@ -28,3 +28,6 @@ assert(math.fabs(aFeatureData.realArray("double_array").value(1) - 1.5) < 10 **
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 6b540f8504a4bd5a9e6b361619ee519b71250773..66a1a0a2198ba803c36b494bc91d050d42beff15 100755 (executable)
@@ -29,3 +29,6 @@ assert(aFeatureData.intArray("IntArray_1").size() == 5)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 7ba9cb5eaf234de5d026d5d8ee53cfc1e16e21bc..b74b29e7efeb22cfe86592ee022bef8efaa44134 100755 (executable)
@@ -34,3 +34,5 @@ assert(aColors.value(2) == 250)
 
 aSession.finishOperation()
 
+import model
+assert(model.checkPythonDump())
index 2f86fbefc8f45719d2f9b421f5eee433153a5a46..3981f30d4f257df0c4604ce52f1cdb38ceefd727 100644 (file)
@@ -32,3 +32,6 @@ aSession.redo()
 assert(aDoc.size("Construction") == 8)\r
 assert(aSession.canUndo())\r
 assert(not aSession.canRedo())\r
+\r
+import model\r
+assert(model.checkPythonDump())\r
index c0344eab22410c05fcef344bf4947c1520d2413f..b43279ad5b058fb86d7dff8a86036e131cc5c7b4 100755 (executable)
@@ -15,3 +15,6 @@ from ModelGeomAlgo import *
 __updated__ = "2016-07-20"
 
 aSession = ModelAPI_Session.get()
+
+import model
+assert(model.checkPythonDump())
index ed67336a7c693064286aeae595c17c863789ffc4..c9ff7f1f41a7eeb8c08827883e70d59c0f7aeefa 100644 (file)
@@ -22,6 +22,7 @@
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelAPI_Validator.h>
 
 #include <GeomDataAPI_Dir.h>
 #include <GeomDataAPI_Point.h>
@@ -95,8 +96,8 @@ std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data
       return "original model had no attribute '" + aThisIter->first + "'";
     }
     if (theAttrs[aThisIter->first] != aThisIter->second) {
-      return "attribute '" + aThisIter->first + "' is different '" + 
-        theAttrs[aThisIter->first] + "' != '" + aThisIter->second;
+      return "attribute '" + aThisIter->first + "' is different (original != current) '" + 
+        theAttrs[aThisIter->first] + "' != '" + aThisIter->second + "'";
     }
   }
   // iterate back to find lack attribute in the current model
@@ -110,6 +111,11 @@ std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data
 }
 
 std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
+  static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
+  FeaturePtr aFeatOwner = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttr->owner());
+  if (aFeatOwner.get() && !aFactory->isCase(aFeatOwner, theAttr->id())) {
+    return "__notcase__";
+  }
   if (!theAttr->isInitialized()) {
     return "__notinitialized__";
   }
index c19f474096e4178bc5be903561c2523a8f951a07..7931f0dcae2a8e34eb8a91c1987348a9a8b1f98f 100644 (file)
@@ -309,7 +309,7 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc,
         }
       }
       return "For document '" + theDocName + 
-        "' the number of features becomes smaller, there is no feature '" + aLostName + "'";
+        "' the number of features is decreased, there is no feature '" + aLostName + "'";
     }
   }
   return ""; // ok
index 4e810d765ac3be7cf8b10a32e1b53248e5ceb68e..46b076db2180c67376b914cdd2968f673221997a 100644 (file)
@@ -23,6 +23,7 @@ from GeomDataAPI import *
 from ModelAPI import *
 import math
 import unittest
+import model
 
 __updated__ = "2015-04-27"
 
@@ -45,6 +46,7 @@ class TestParameterRename(unittest.TestCase):
         self.createFeature()
 
     def tearDown(self):
+        assert(model.checkPythonDump())
         self.aSession.closeAll()
 
     def createParameters(self):
index d775d7301d117af8a18a32e6f33b247754f53486..a791a54e95c05751e2625a85690296c25138ee0e 100644 (file)
@@ -158,3 +158,6 @@ assert(aLengthAttr.value() == 250.)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 5521426308a481a6ae59758b712fe18dc300e320..0605fac1a98587defbfb1e3df780c244d5acd86e 100644 (file)
@@ -23,6 +23,7 @@ from GeomDataAPI import *
 from ModelAPI import *
 import math
 import unittest
+import model
 
 __updated__ = "2015-04-27"
 
@@ -47,6 +48,7 @@ class TestParameterRename(unittest.TestCase):
         self.createFeature()
 
     def tearDown(self):
+        assert(model.checkPythonDump())
         self.aSession.closeAll()
 
     def createParameters(self):
index 35ff9679ed2a1f4db704c3447597ad29e6a98182..54fe5510f459461f6e397a6d36c9f5d43c2c3cef 100644 (file)
@@ -18,6 +18,7 @@ class FeaturesFixture(unittest.TestCase):
 
     def tearDown(self):
         model.end()
+        assert(model.checkPythonDump())
         model.reset()
 
 #-----------------------------------------------------------------------------
index ce3935cd9578b770336b0452fe938dfab241dcd7..a58c876629fe17bea43eca2dbcc92eb4582470f3 100644 (file)
@@ -18,6 +18,7 @@ class FeaturesAddExtrusionFixture(unittest.TestCase):
 
     def tearDown(self):
         model.end()
+        assert(model.checkPythonDump())
         model.reset()
 
 
index 0a09c80486fd83f5fa37a071ba75f9ea86651210..90d9af9f6d3b08c4061ee3c966df2cb516ad495a 100644 (file)
@@ -18,6 +18,7 @@ class FeaturesAddRevolutionFixture(unittest.TestCase):
 
     def tearDown(self):
         model.end()
+        assert(model.checkPythonDump())
         model.reset()
 
 
index d76377736c7a7c41150b22c65a7245f7f2def4ea..0a204cf0bdbb02f195c4bfb56b0d505ae1fc1e9b 100644 (file)
@@ -9,6 +9,7 @@ class ModelTestCase(unittest.TestCase):
 
     def tearDown(self):
         model.end()
+        assert(model.checkPythonDump())
 
     def test_add_sketch(self):
         plane = model.defaultPlane("XOY")
index 826493a48c1ca5d6b7062397f4e071bc72523d00..d41f7ddcf309dcfa4e1c48e9c628bd15bb11a959 100644 (file)
@@ -14,4 +14,5 @@ class SketcherTestCase(unittest.TestCase):
 
     def tearDown(self):
         model.end()
+        assert(model.checkPythonDump())
         model.reset()
index 10eb81b079664b3b23ba289f4f132395760cf764..74ce7968609e24bfdb3c05fdaffe22a47893404f 100644 (file)
@@ -71,3 +71,5 @@ model.begin()
 mybase.setValue(mylength, 100)
 mybox.setSize(80)
 model.end()
+
+assert(model.checkPythonDump())
index 2086b83c0c5775334e4c4da3647be42bdd7de2f2..0d44f9a1a9bfdc715e14de2b310f3884d9d418c8 100644 (file)
@@ -67,3 +67,5 @@ model.begin()
 mybase.setValue(mylength, 100)
 mybox.setSize(20)
 model.end()
+
+assert(model.checkPythonDump())
\ No newline at end of file
index edfc0b3e5857079d31b8066809435d0e2f1361d9..898e83bfe8378d063ccf5d39b762cd8aabecc3b2 100644 (file)
@@ -22,3 +22,4 @@ mypart = model.addPart(mypartset).document()
 extension.addBoxScript( mypart, 10, 20, 30 )
 model.end()
 
+assert(model.checkPythonDump())
\ No newline at end of file
index c84684334f4e982325f2b277427adb5a6478c142..f0c236b51e0987dfc0132595c06dd216bd8f1117 100644 (file)
@@ -218,3 +218,5 @@ b4 = body_4()
 
 boolean = model.addFuse(part, boolean.result() + b4.result())
 model.end()
+
+assert(model.checkPythonDump())
index 3e0cf8e207c26c3003b9f9d1da3bf8f5e6cc4c9a..593349f77ff4ab1b596205bd98919c6db7f7c8c8 100644 (file)
@@ -145,3 +145,6 @@ assert (angle(aSketchLineA, aSketchLineB) == NEW_ANGLE_DEGREE)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index e37159af8b89bbb8683d0d2a8235e344206ecebb..a1697920ead11a9e49aa7a23cd9ee787a464ad77 100644 (file)
@@ -209,3 +209,6 @@ assert (aCircleCenter.x() == 0. and aCircleCenter.y() == 0.)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index dda5b8de16bebf0cd0ee03190de580a6d989ccd4..b5d898273aec132fa44c00bc2f962227a66c8bd9 100644 (file)
@@ -100,3 +100,6 @@ checkCollinear(aSketchLineA, aSketchLineB)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 75ea588541f45da65b254925605f4c1bafa91c90..9f64238c7c9c104e67fff37efd2021d9a345db19 100644 (file)
@@ -179,3 +179,6 @@ assert (math.fabs(distancePointPoint(aLineAStartPoint, aLineAEndPoint) - PT_LINE
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index d4176eebd4449fcbb7dd8496b5291832a5a5c8b8..492ecb6fe65127fdbb046453d2f5e453225cda12 100644 (file)
@@ -208,3 +208,6 @@ assert (math.fabs(aLine2Len - anExtLineLen) < 1.e-10)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 7a7a7d3faa92392503e7839b5b20bb2ad3717fdb..dc0b226d20b0d416ee5887f54e42c9eccd8ac875 100644 (file)
@@ -74,3 +74,6 @@ assert(aLineStartPoint.y() == aLineEndPoint.y())
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 88f9292b61e4f436799dae44bb3a415005a30abc..72db4d76f7d3b14f3778c3e5c585fbe252b89f54 100644 (file)
@@ -94,3 +94,6 @@ assert (math.fabs(aLineAEndPoint.x() - aLineAStartPoint.x() - 140) < 1.e-10)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 80ef018179857a148b2943eab474b3a24fc0567f..39db682204acc2f974bbd2faa3ce1afd90c97c50 100644 (file)
@@ -140,3 +140,6 @@ assert (anOriginCoord.x() == 0. and anOriginCoord.y() == 0.)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 1d06c8d6abdad6aba2c08a000ff454666142d668..30e8570f41d43859049d537079c851990be69ae9 100644 (file)
@@ -201,3 +201,6 @@ checkMirror(aRefListB, aRefListC, aMirrorLine)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 03eba23ccf379ae59722e2f90b440a10a59585ad..076b2fc6277986ba1e1340c3a28b4e5a29c6cdb0 100644 (file)
@@ -108,3 +108,6 @@ assert (aLineBEndPointPrev != aLineBEndPointNew)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 837eb262695ded641b8737836bf0a6c3b7706fbd..42c2c98574efa659af17689816aea709311a86ad 100644 (file)
@@ -121,3 +121,6 @@ assert (aLineBEndPointPrev   != (aLineBEndPoint.x(),   aLineBEndPoint.y()))
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index edc37350bb130c8c020e10802f4cdf37b6e15d61..acef6c2f03287e8b8d00c7d72215fd9a610d8d6b 100644 (file)
@@ -150,3 +150,6 @@ assert (aCircleRadius.value() == 25)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 2fe43e55756e8d6458fa82df145107020771f593..44f741503c445a26fd56fde77468a8af18133331 100644 (file)
@@ -135,3 +135,6 @@ assert ((aLineCStartPoint.x(), aLineCStartPoint.y()) == (aLineBEndPoint.x(), aLi
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index df3cd3115ac72f8c589ee84217a87d730eb9d098..69991a49a1d0de630b0c577d3efae282a6b23ea1 100644 (file)
@@ -305,3 +305,6 @@ assert(math.fabs(distancePointLine(aCircleCenter, aLine) - round(aCircleRadius.v
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 3a03d1d0e750dee73e0ce9be150f80cb50765145..f70040248ee769213a09ddc33f15de5c412f7f73 100644 (file)
@@ -74,3 +74,6 @@ assert(aLineStartPoint.x() == aLineEndPoint.x())
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index bb2735398b05f32698f21aa0e6c7b269f277f608..2ca48e60dcbcbded3d1e16058586d9c424681113 100644 (file)
@@ -276,3 +276,6 @@ checkFillet(aResObjects, FILLET_RADIUS2)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index f745cdfa56eb1d48da1d8f93b3922f57973c84f7..372bd4dad1b9d26967cabe967c9cf6cbcbd4df11 100644 (file)
@@ -119,3 +119,6 @@ aSession.finishOperation()
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 27b0aae2430b8fc0de718f988352bc18884a4e64..2afda371697834187d41e8c319458e9652672948 100644 (file)
@@ -219,3 +219,6 @@ checkRotation(aRotated, aNbCopies.value(), CENTER_X, CENTER_Y, ANGLE)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 2c0a2b9373ed2c93a83e469f8345a0d7302517da..0d3971e27e640289d955646ce9a345c258086c79 100644 (file)
@@ -210,3 +210,6 @@ checkTranslation(aTranslated, aNbCopies.value(), DELTA_X, DELTA_Y)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 909d079be762ff59f888b5b4f922e97b817c47a1..0b89eca5fee9378ebc98f2f7ec090f95d5beaa4e 100644 (file)
@@ -137,3 +137,6 @@ assert(math.fabs(aProjLineEnd.y() - aLineEnd.y()) < 1.e-10)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index d4c7061a30833483398f702956aa9b554012deab..b822c58d3c1cbf655907601f3afea7a38cbbcbe9 100644 (file)
@@ -88,3 +88,6 @@ assert (aNbLines == 4)
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index 8d8c4c82043cfe51a01da07904e9716b08986605..d853339c43f5d348295719ce382bb192946f7069 100644 (file)
@@ -249,3 +249,6 @@ aSession.finishOperation()
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())
index b37b0f61dd8ed40904ef4567ce0cf431ce7b2909..55414c9c8f9c811b93bf8cb6aa2634dd9fdb62a6 100644 (file)
@@ -100,3 +100,6 @@ aResultConstruction = modelAPI_ResultConstruction(aResult)
 aShape = aResultConstruction.shape()
 assert (aShape is not None)
 assert (not aShape.isNull())
+
+import model
+assert(model.checkPythonDump())
index e324fd2dab9d03fcfcca604eafa30a58b31f8974..3e8b9e0045c362cfb40271738b14698e9210aa29 100644 (file)
@@ -155,3 +155,6 @@ aSession.finishOperation()
 #=========================================================================
 # End of test
 #=========================================================================
+
+import model
+assert(model.checkPythonDump())