]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
ModelDocument test corrected to avoid SWIG/Python crash
authorsbh <sergey.belash@opencascade.com>
Fri, 26 Dec 2014 14:19:08 +0000 (17:19 +0300)
committersbh <sergey.belash@opencascade.com>
Fri, 26 Dec 2014 14:19:08 +0000 (17:19 +0300)
src/ModelAPI/Test/TestDocument.py

index 86b380ddd47f92acf9a2424c12d7054aa1e1dc0b..d3693974e5f2abb6e856b9eeff5cf3ad7b59a549 100644 (file)
@@ -10,7 +10,7 @@ from ModelAPI import *
 # from GeomDataAPI import *
 # from GeomAlgoAPI import *
 
-__updated__ = "2014-12-24"
+__updated__ = "2014-12-26"
 
 #=========================================================================
 # Creation and activation of documents
@@ -38,8 +38,8 @@ aSession.finishOperation()
 assert(aSession.activeDocument())
 assert(aSession.activeDocument().id() == "root")
 # check all opened docs
-for aDoc in aSession.allOpenedDocuments():
-    assert(aDoc)
+allDocsList = aSession.allOpenedDocuments()
+assert(len(allDocsList) != 0)
 # Activate Part_1 doc back for further testing
 aSession.startOperation()
 aSession.setActiveDocument(aSession.document("Part_1"), False)