OpenRTM_aist
test
test_CorbaObjectManager.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
# -*- Python -*-
3
4
#
5
# \file test_CorbaObjManager.py
6
# \brief test for CORBA Object manager class
7
# \date $Date: 2007/08/27$
8
# \author Shinji Kurihara
9
#
10
# Copyright (C) 2006
11
# Noriaki Ando
12
# Task-intelligence Research Group,
13
# Intelligent Systems Research Institute,
14
# National Institute of
15
# Advanced Industrial Science and Technology (AIST), Japan
16
# All rights reserved.
17
#
18
19
import
sys
20
sys.path.insert(1,
"../"
)
21
22
import
unittest
23
24
import
OpenRTM_aist
25
26
from
omniORB
import
CORBA, PortableServer
27
from
CorbaObjectManager
import
*
28
29
30
31
class
test_comp
(
OpenRTM_aist.RTObject_impl
):
32
def
__init__
(self):
33
pass
34
35
def
echo
(self, msg):
36
print
msg
37
return
msg
38
39
40
class
TestCorbaObjectManager
(unittest.TestCase):
41
42
def
setUp
(self):
43
self.
_orb
= CORBA.ORB_init()
44
self.
_poa
= self.
_orb
.resolve_initial_references(
"RootPOA"
)
45
self.
_poa
._get_the_POAManager().activate()
46
47
self.
_com
=
CorbaObjectManager
(self.
_orb
, self.
_poa
)
48
49
self.
_obj
=
test_comp
()
50
51
def
tearDown
(self):
52
pass
53
54
55
def
test_activate
(self):
56
self._com.activate(self._obj)
57
58
def
test_deactivate
(self):
59
self.
_com
.deactivate(self.
_obj
)
60
61
62
if
__name__ ==
'__main__'
:
63
unittest.main()
test_CorbaObjectManager.TestCorbaObjectManager._obj
_obj
Definition:
test_CorbaObjectManager.py:49
test_CorbaObjectManager.TestCorbaObjectManager._poa
_poa
Definition:
test_CorbaObjectManager.py:44
test_CorbaObjectManager.TestCorbaObjectManager._com
_com
Definition:
test_CorbaObjectManager.py:47
CorbaObjectManager
test_CorbaObjectManager.TestCorbaObjectManager._orb
_orb
Definition:
test_CorbaObjectManager.py:43
test_CorbaObjectManager.TestCorbaObjectManager.test_deactivate
def test_deactivate(self)
Definition:
test_CorbaObjectManager.py:58
test_CorbaObjectManager.TestCorbaObjectManager.tearDown
def tearDown(self)
Definition:
test_CorbaObjectManager.py:51
test_CorbaObjectManager.test_comp
Definition:
test_CorbaObjectManager.py:31
test_CorbaObjectManager.TestCorbaObjectManager.setUp
def setUp(self)
Definition:
test_CorbaObjectManager.py:42
test_CorbaObjectManager.TestCorbaObjectManager
Definition:
test_CorbaObjectManager.py:40
test_CorbaObjectManager.TestCorbaObjectManager.test_activate
def test_activate(self)
Definition:
test_CorbaObjectManager.py:55
OpenRTM_aist.RTObject.RTObject_impl
Definition:
RTObject.py:68
test_CorbaObjectManager.test_comp.echo
def echo(self, msg)
Definition:
test_CorbaObjectManager.py:35
test_CorbaObjectManager.test_comp.__init__
def __init__(self)
Definition:
test_CorbaObjectManager.py:32
openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:07