test_Factory.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- Python -*-
00003 
00004 #
00005 # \file test_Factory.py
00006 # \brief test for RTComponent factory class
00007 # \date $Date: $
00008 # \author Shinji Kurihara
00009 #
00010 # Copyright (C) 2003-2005
00011 #     Task-intelligence Research Group,
00012 #     Intelligent Systems Research Institute,
00013 #     National Institute of
00014 #         Advanced Industrial Science and Technology (AIST), Japan
00015 #     All rights reserved.
00016 #
00017 
00018 import sys
00019 sys.path.insert(1,"../")
00020 
00021 import OpenRTM_aist
00022 import unittest
00023 
00024 from Factory import *
00025 
00026 class testClass:
00027   def __init__(self,mgr):
00028     self.test(mgr)
00029     pass
00030 
00031   def test(self,mgr):
00032     print "testClass: ", mgr
00033 
00034 class TestFactoryPython(unittest.TestCase):
00035 
00036   def setUp(self):
00037     #profile = OpenRTM_aist.Properties()
00038     profile = None
00039     self.factory = FactoryPython(profile, testClass, OpenRTM_aist.Delete)
00040     return
00041 
00042   def tearDown(self):
00043     OpenRTM_aist.Manager.instance().shutdownManager()
00044     del self
00045     return
00046 
00047   def test_create(self):
00048     self.factory.create(3)
00049     self.assertEqual(self.factory.number(), 0)
00050   
00051   def destroy(self):
00052     pass
00053 
00054 ############### test #################
00055 if __name__ == '__main__':
00056         unittest.main()


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