test_Factory.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 
4 #
5 # \file test_Factory.py
6 # \brief test for RTComponent factory class
7 # \date $Date: $
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 OpenRTM_aist
22 import unittest
23 
24 from Factory import *
25 
26 class testClass:
27  def __init__(self,mgr):
28  self.test(mgr)
29  pass
30 
31  def test(self,mgr):
32  print "testClass: ", mgr
33 
34 class TestFactoryPython(unittest.TestCase):
35 
36  def setUp(self):
37  #profile = OpenRTM_aist.Properties()
38  profile = None
39  self.factory = FactoryPython(profile, testClass, OpenRTM_aist.Delete)
40  return
41 
42  def tearDown(self):
43  OpenRTM_aist.Manager.instance().shutdownManager()
44  del self
45  return
46 
47  def test_create(self):
48  self.factory.create(3)
49  self.assertEqual(self.factory.number(), 0)
50 
51  def destroy(self):
52  pass
53 
54 ############### test #################
55 if __name__ == '__main__':
56  unittest.main()
def test(self, mgr)
Definition: test_Factory.py:31
def __init__(self, mgr)
Definition: test_Factory.py:27


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