test_InPortPushConnector.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 
5 # \file test_InPortPushConnector.py
6 # \brief test for InPortPushConnector 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 InPortPushConnector import *
24 
25 import RTC, RTC__POA
26 import OpenRTM_aist
27 from OpenRTM_aist import *
28 
29 
31  _buffer = None
32  _prop = None
33 
34  def init(self, prop):
35  self._prop = prop
36 
37  def setBuffer(self, buff):
38  self._buffer = buff
39 
40  def setListener(self, info, listener):
41  pass
42 
43 
44 class TestInPortPushConnector(unittest.TestCase):
45  def setUp(self):
46  OpenRTM_aist.Manager.instance()
48 
49  def test_read(self):
50  data = []
51  self.assertEqual(self._con.read(data),OpenRTM_aist.DataPortStatus.BUFFER_TIMEOUT)
52  data = 123
53  self.assertEqual(self._con.read(data),OpenRTM_aist.DataPortStatus.BUFFER_TIMEOUT)
54  return
55 
56  def test_disconnect(self):
57  self.assertEqual(self._con.disconnect(),OpenRTM_aist.DataPortStatus.PORT_OK)
58  return
59 
60  def test_activate(self):
61  self._con.activate()
62  return
63 
64  def test_deactivate(self):
65  self._con.deactivate()
66  return
67 
68  def test_createBuffer(self):
69  self._con.createBuffer(OpenRTM_aist.ConnectorInfo("name","id",[],OpenRTM_aist.Properties()))
70  return
71 
72 
73 
74 
75 ############### test #################
76 if __name__ == '__main__':
77  unittest.main()
78 
The Properties class represents a persistent set of properties.
Definition: Properties.py:83


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