test_ECFactory.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 #
00004 # \file test_ECFactory.py
00005 # \brief test for ExecutionContext Factory class
00006 # \date $Date: $
00007 # \author Shinji Kurihara
00008 # 
00009 # Copyright (C) 2007
00010 #     Task-intelligence Research Group,
00011 #     Intelligent Systems Research Institute,
00012 #     National Institute of
00013 #         Advanced Industrial Science and Technology (AIST), Japan
00014 #     All rights reserved.
00015 # 
00016 
00017 
00018 import sys
00019 sys.path.insert(1,"../")
00020 
00021 import unittest
00022 
00023 from ECFactory import *
00024 import OpenRTM_aist
00025 
00026 
00027 class TestECFactoryPython(unittest.TestCase):
00028 
00029   def setUp(self):
00030     self.ecfact = ECFactoryPython("test", self.create_func, self.del_func)
00031     return
00032   
00033   def tearDown(self):
00034     OpenRTM_aist.Manager.instance().shutdownManager()
00035     del self
00036     return
00037 
00038   def create_func(self):
00039     print "create_func"
00040 
00041   def del_func(self, ec):
00042     print "del_func"
00043     
00044   def test_name(self):
00045     name = self.ecfact.name()
00046     self.assertEqual(name,"test", "name is false.")
00047 
00048   def test_create(self):
00049     self.ecfact.create()
00050 
00051 
00052   def test_destroy(self):
00053     self.ecfact.destroy("hoge")
00054     
00055 ############### test #################
00056 if __name__ == '__main__':
00057         unittest.main()
00058 


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