test-hrpsys-config.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 PKG = 'hrpsys_tools'
4 NAME = 'test_hrpsys_config'
5 
6 import imp ## for rosbuild
7 try:
8  imp.find_module(PKG)
9 except:
10  import roslib; roslib.load_manifest(PKG)
11 
12 from hrpsys.hrpsys_config import *
13 from hrpsys import rtm
14 
15 import argparse,unittest,rostest
16 
17 class SampleHrpsysConfigurator(HrpsysConfigurator):
18  def init(self, robotname="SampleRobot(Robot)0", url=""):
19  HrpsysConfigurator.init(self, robotname=robotname, url=url)
20 
21 class TestHrpsysConfigurator(unittest.TestCase):
22  def setUp(self):
23  parser = argparse.ArgumentParser(description='hrpsys command line interpreters')
24  parser.add_argument('--host', help='corba name server hostname')
25  parser.add_argument('--port', help='corba name server port number')
26  args, unknown = parser.parse_known_args()
27 
28  if args.host:
29  rtm.nshost = args.host
30  if args.port:
31  rtm.nsport = args.port
33 
34  def test(self):
35  self.assertTrue(True,"ok")
36 
37 
38 if __name__ == '__main__':
39  rostest.run(PKG, NAME, TestHrpsysConfigurator, sys.argv)
def init(self, robotname="SampleRobot(Robot)0", url="")


hrpsys_tools
Author(s): Kei Okada
autogenerated on Mon May 10 2021 02:30:58