test_say.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib
00003 roslib.load_manifest('cob_script_server')
00004 
00005 import sys
00006 import unittest
00007 
00008 import rospy
00009 import rostest
00010 
00011 from simple_script_server import *
00012 sss = simple_script_server()
00013 
00014 class SayTest(unittest.TestCase):
00015         def __init__(self, *args):
00016                 super(SayTest, self).__init__(*args)
00017                 rospy.init_node('test_say_test')
00018 
00019         def test_say(self):
00020                 sss.say(["hello"])
00021 
00022         def as_cb(self, goal):
00023                 result = JointTrajectoryResult()
00024                 #self.as_server.set_preempted(result)
00025                 self.as_cb_executed = True
00026                 self.traj = goal.trajectory
00027                 print "action server callback"
00028                 self.as_server.set_succeeded(result)
00029 
00030 if __name__ == '__main__':
00031         try:
00032                 rostest.run('rostest', 'test_say_test', SayTest, sys.argv)
00033         except KeyboardInterrupt, e:
00034                 pass
00035         print "exiting"
00036 


cob_script_server
Author(s): Florian Weisshardt
autogenerated on Sun Oct 5 2014 22:59:42