test_DataPortStatus.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 #
00005 #  \file  test_DataPortStatus.py
00006 #  \brief test for CorbaPort class
00007 #  \date  $Date: 2007/09/27 $
00008 #  \author Shinji Kurihara
00009 # 
00010 #  Copyright (C) 2006
00011 #      Noriaki Ando
00012 #      Task-intelligence Research Group,
00013 #      Intelligent Systems Research Institute,
00014 #      National Institute of
00015 #          Advanced Industrial Science and Technology (AIST), Japan
00016 #      All rights reserved.
00017 
00018 import OpenRTM_aist
00019 import RTC, RTC__POA
00020 
00021 import sys
00022 sys.path.insert(1,"../")
00023 
00024 import unittest
00025 
00026 from DataPortStatus import *
00027 
00028         
00029 class TestDataPortStatus(unittest.TestCase):
00030         def setUp(self):
00031                 self._dps = DataPortStatus()
00032 
00033 
00034         def test_toString(self):
00035                 self.assertEqual(self._dps.toString(DataPortStatus.PORT_OK), "PORT_OK")
00036                 self.assertEqual(self._dps.toString(DataPortStatus.PORT_ERROR), "PORT_ERROR")
00037                 self.assertEqual(self._dps.toString(DataPortStatus.BUFFER_FULL), "BUFFER_FULL")
00038                 self.assertEqual(self._dps.toString(DataPortStatus.BUFFER_EMPTY), "BUFFER_EMPTY")
00039                 self.assertEqual(self._dps.toString(DataPortStatus.BUFFER_TIMEOUT), "BUFFER_TIMEOUT")
00040                 self.assertEqual(self._dps.toString(DataPortStatus.SEND_FULL), "SEND_FULL")
00041                 self.assertEqual(self._dps.toString(DataPortStatus.SEND_TIMEOUT), "SEND_TIMEOUT")
00042                 self.assertEqual(self._dps.toString(DataPortStatus.RECV_EMPTY), "RECV_EMPTY")
00043                 self.assertEqual(self._dps.toString(DataPortStatus.RECV_TIMEOUT), "RECV_TIMEOUT")
00044                 self.assertEqual(self._dps.toString(DataPortStatus.INVALID_ARGS), "INVALID_ARGS")
00045                 self.assertEqual(self._dps.toString(DataPortStatus.PRECONDITION_NOT_MET), "PRECONDITION_NOT_MET")
00046                 self.assertEqual(self._dps.toString(DataPortStatus.CONNECTION_LOST), "CONNECTION_LOST")
00047                 self.assertEqual(self._dps.toString(DataPortStatus.UNKNOWN_ERROR), "UNKNOWN_ERROR")
00048 
00049 
00050 ############### test #################
00051 if __name__ == '__main__':
00052         unittest.main()


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:28