test_OutPortConsumer.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 #
5 # \file test_OutPortConsumer.py
6 # \brief test for OutPortConsumer class
7 # \date $Date: 2007/09/19$
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 from omniORB import *
23 from omniORB import any
24 
25 import unittest
26 from OutPortConsumer import *
27 
28 import RTC, RTC__POA
29 
30 import OpenRTM_aist
31 
32 
34  def subscribeInterface(self, prop):
35  print "subscribeInterface"
36  return
37 
38  def unsubscribeInterface(self, prop):
39  print "unsubscribeInterface"
40  return
41 
42 
43 class TestOutPortConsumer(unittest.TestCase):
44  def setUp(self):
45  self._oc = OutPortConsumerFactory.instance()
46  return
47 
49  _oc1 = OutPortConsumerFactory.instance()
50  self.assertEqual(self._oc, _oc1)
51  return
52 
53  def test_subscribe(self):
54  subs = self._oc.subscribe(None)
55  subs(ConsumerMock())
56  subs(ConsumerMock())
57  subs(ConsumerMock())
58  return
59 
60  def test_unsubscribe(self):
61  subs = self._oc.unsubscribe(None)
62  subs(ConsumerMock())
63  subs(ConsumerMock())
64  subs(ConsumerMock())
65  return
66 
67 
68 
69 if __name__ == '__main__':
70  unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:07