test_InPortConsumer.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 
5 # \file test_InPortConsumer.py
6 # \brief test for InPort template class
7 # \date $Date: 2007/09/20 $
8 # \author Shinji Kurihara
9 #
10 # Copyright (C) 2003-2005
11 # Task-intelligence Research Group,
12 # Intelligent Systems Research Institute,
13 # National Institute of
14 # Advanced Industrial Science and Technology (AIST), Japan
15 # All rights reserved.
16 
17 
18 import sys
19 sys.path.insert(1,"../")
20 
21 import unittest
22 
23 from InPortConsumer import *
24 
25 import RTC, RTC__POA
26 import OpenRTM_aist
27 
29  def __init__(self):
30  pass
31 
32  def publishInterfaceProfile(self, prop):
33  return True
34 
35  def subscribeInterface(self, prop):
36  return True
37 
38 
39 class TestInPortConsumer(unittest.TestCase):
40  def setUp(self):
42  return
43 
45  pubFunc = InPortConsumerFactory.instance().publishInterfaceProfileFunc(None)
46  pubFunc(self._mock)
47  return
48 
50  subFunc = InPortConsumerFactory.instance().subscribeInterfaceFunc(None)
51  self.assertEqual(subFunc(self._mock),True)
52  return
53 
54 
55 
56 if __name__ == '__main__':
57  unittest.main()
58 
test_InPortConsumer.TestInPortConsumer._mock
_mock
Definition: test_InPortConsumer.py:41
test_InPortConsumer.TestInPortConsumer.setUp
def setUp(self)
Definition: test_InPortConsumer.py:40
test_InPortConsumer.TestInPortConsumer.test_subscribeInterfaceFunc
def test_subscribeInterfaceFunc(self)
Definition: test_InPortConsumer.py:49
test_InPortConsumer.TestInPortConsumer
Definition: test_InPortConsumer.py:39
test_InPortConsumer.InPortConsumerMock.subscribeInterface
def subscribeInterface(self, prop)
Definition: test_InPortConsumer.py:35
test_InPortConsumer.InPortConsumerMock.publishInterfaceProfile
def publishInterfaceProfile(self, prop)
Definition: test_InPortConsumer.py:32
test_InPortConsumer.TestInPortConsumer.test_publishInterfaceProfileFunc
def test_publishInterfaceProfileFunc(self)
Definition: test_InPortConsumer.py:44
test_InPortConsumer.InPortConsumerMock.__init__
def __init__(self)
Definition: test_InPortConsumer.py:29
test_InPortConsumer.InPortConsumerMock
Definition: test_InPortConsumer.py:28


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Apr 21 2025 02:45:06