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 ############### test #################
56 if __name__ == '__main__':
57  unittest.main()
58 


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:34