test_ECFactory.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- Python -*-
3 #
4 # \file test_ECFactory.py
5 # \brief test for ExecutionContext Factory class
6 # \date $Date: $
7 # \author Shinji Kurihara
8 #
9 # Copyright (C) 2007
10 # Task-intelligence Research Group,
11 # Intelligent Systems Research Institute,
12 # National Institute of
13 # Advanced Industrial Science and Technology (AIST), Japan
14 # All rights reserved.
15 #
16 
17 
18 import sys
19 sys.path.insert(1,"../")
20 
21 import unittest
22 
23 from ECFactory import *
24 import OpenRTM_aist
25 
26 
27 class TestECFactoryPython(unittest.TestCase):
28 
29  def setUp(self):
30  self.ecfact = ECFactoryPython("test", self.create_func, self.del_func)
31  return
32 
33  def tearDown(self):
34  OpenRTM_aist.Manager.instance().shutdownManager()
35  del self
36  return
37 
38  def create_func(self):
39  print "create_func"
40 
41  def del_func(self, ec):
42  print "del_func"
43 
44  def test_name(self):
45  name = self.ecfact.name()
46  self.assertEqual(name,"test", "name is false.")
47 
48  def test_create(self):
49  self.ecfact.create()
50 
51 
52  def test_destroy(self):
53  self.ecfact.destroy("hoge")
54 
55 
56 if __name__ == '__main__':
57  unittest.main()
58 
name
Definition: setup.py:543


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:07