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