test_BufferStatus.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 # \file test_BufferStatus.py
5 # \brief test of BufferStatus class
6 # \date $Date: 2007/09/12 $
7 # \author Shinji Kurihara
8 #
9 # Copyright (C) 2009
10 # Noriaki Ando
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 BufferStatus import *
24 
26  def __init__(self):
27  pass
28 
29 class TestBufferStatus(unittest.TestCase):
30  def setUp(self):
31  self.bf = MyBuffer()
32 
33 
34  def test_toString(self):
35  self.assertEqual(self.bf.toString(BufferStatus.BUFFER_OK),"BUFFER_OK")
36  self.assertEqual(self.bf.toString(BufferStatus.BUFFER_ERROR),"BUFFER_ERROR")
37  self.assertEqual(self.bf.toString(BufferStatus.BUFFER_FULL),"BUFFER_FULL")
38  self.assertEqual(self.bf.toString(BufferStatus.BUFFER_EMPTY),"BUFFER_EMPTY")
39  self.assertEqual(self.bf.toString(BufferStatus.NOT_SUPPORTED),"NOT_SUPPORTED")
40  self.assertEqual(self.bf.toString(BufferStatus.TIMEOUT),"TIMEOUT")
41  self.assertEqual(self.bf.toString(BufferStatus.PRECONDITION_NOT_MET),"PRECONDITION_NOT_MET")
42 
43 
44 
45 ############### test #################
46 if __name__ == '__main__':
47  unittest.main()


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