[openrtm-commit:00774] r535 - branches/work/OpenRTM-aist-Python/OpenRTM_aist/test

openrtm @ openrtm.org openrtm @ openrtm.org
2012年 3月 13日 (火) 19:08:06 JST


Author: kurihara
Date: 2012-03-13 19:08:06 +0900 (Tue, 13 Mar 2012)
New Revision: 535

Modified:
   branches/work/OpenRTM-aist-Python/OpenRTM_aist/test/test_RTObject.py
Log:
Update of the test item. refs #2387

Modified: branches/work/OpenRTM-aist-Python/OpenRTM_aist/test/test_RTObject.py
===================================================================
--- branches/work/OpenRTM-aist-Python/OpenRTM_aist/test/test_RTObject.py	2012-03-13 10:06:31 UTC (rev 534)
+++ branches/work/OpenRTM-aist-Python/OpenRTM_aist/test/test_RTObject.py	2012-03-13 10:08:06 UTC (rev 535)
@@ -201,7 +201,7 @@
 
   def test_attach_context(self):
     rtobj = TestComp(self._orb, self._poa)
-    ec = OpenRTM_aist.PeriodicExecutionContext(rtobj.getObjRef(), 10)
+    ec = OpenRTM_aist.PeriodicExecutionContext()
     id = rtobj.getObjRef().attach_context(ec.getObjRef())
     print "attach_context: ", id
     print rtobj.getObjRef().detach_context(id)
@@ -328,6 +328,7 @@
     rtobj = TestComp(self._orb, self._poa)
     ec_args = "PeriodicExecutionContext"+"?" + "rate=1000"
     ec=OpenRTM_aist.Manager.instance().createContext(ec_args)
+    ec.set_rate(1000)
     ec.bindComponent(rtobj)
     self.assertEqual(rtobj.getExecutionRate(0),1000.0)
     return
@@ -355,8 +356,8 @@
     ec=OpenRTM_aist.Manager.instance().createContext(ec_args)
     ec.set_rate(1000.0)
     ec.bindComponent(rtobj)
+    ec.start()
     self.assertEqual(rtobj.activate(0),RTC.RTC_OK)
-    ec.start()
     time.sleep(0.1)
     ret = rtobj.deactivate(0)
     time.sleep(0.1)
@@ -369,9 +370,9 @@
     ec_args = "PeriodicExecutionContext"+"?" + "rate=1000"
     ec=OpenRTM_aist.Manager.instance().createContext(ec_args)
     ec.bindComponent(rtobj)
+    ec.start()
     self.assertEqual(rtobj.activate(0),RTC.RTC_OK)
-    ec.start()
-    ec._comps[0]._sm._sm.goTo(RTC.ERROR_STATE)
+    ec._worker._comps[0]._sm.goTo(RTC.ERROR_STATE)
     time.sleep(0.1)
     self.assertEqual(rtobj.reset(0),RTC.RTC_OK)
     ec.stop()



openrtm-commit メーリングリストの案内