Salome HOME
Merge branch 'V7_dev'
[modules/yacs.git] / src / SALOMEDS / Test / SALOMEDSTest_AttributeComment.cxx
index 83a33eff56f714daddc2d2ec5f692cff0fff5b47..6c93cd649dbdcf287a5e8fb53a1ea19f3c72fdae 100755 (executable)
@@ -33,7 +33,12 @@ void SALOMEDSTest::testAttributeComment()
   CPPUNIT_ASSERT(sm);
 
   //Create a new study
-  _PTR(Study) study = sm->NewStudy("Test");
+  std::vector<std::string> ost(sm->GetOpenStudies());
+  _PTR(Study) study;
+  if(ost.empty())
+    study = sm->NewStudy("Test");
+  else
+    study = sm->GetStudyByName(ost[0]);
 
   CPPUNIT_ASSERT(study);