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 
55 if __name__ == '__main__':
56  unittest.main()
test_Factory.testClass.__init__
def __init__(self, mgr)
Definition: test_Factory.py:27
test_Factory.TestFactoryPython.destroy
def destroy(self)
Definition: test_Factory.py:51
test_Factory.TestFactoryPython
Definition: test_Factory.py:34
test_Factory.TestFactoryPython.factory
factory
Definition: test_Factory.py:39
test_Factory.testClass
Definition: test_Factory.py:26
test_Factory.TestFactoryPython.setUp
def setUp(self)
Definition: test_Factory.py:36
test_Factory.testClass.test
def test(self, mgr)
Definition: test_Factory.py:31
test_Factory.TestFactoryPython.test_create
def test_create(self)
Definition: test_Factory.py:47
test_Factory.TestFactoryPython.tearDown
def tearDown(self)
Definition: test_Factory.py:42


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Apr 21 2025 02:45:06