42 from subprocess
import call
44 rosrun_script =
'rosrun.bat' if sys.platform ==
'win32' else 'rosrun' 49 cmd = [rosrun_script,
'topic_tools',
'drop']
50 self.assertNotEquals(0, call(cmd))
51 self.assertNotEquals(0, call(cmd + [
'//',
'1',
'2',
'output']))
52 self.assertNotEquals(0, call(cmd + [
'input',
'1',
'2',
'output',
'extra']))
53 self.assertNotEquals(0, call(cmd + [
'input',
'-1',
'2',
'output']))
54 self.assertNotEquals(0, call(cmd + [
'input',
'1',
'0',
'output']))
57 cmd = [rosrun_script,
'topic_tools',
'mux']
58 self.assertNotEquals(0, call(cmd))
59 self.assertNotEquals(0, call(cmd + [
'//',
'input']))
62 cmd = [rosrun_script,
'topic_tools',
'switch_mux']
63 self.assertNotEquals(0, call(cmd))
64 self.assertNotEquals(0, call(cmd + [
'//',
'input']))
67 cmd = [rosrun_script,
'topic_tools',
'relay']
68 self.assertNotEquals(0, call(cmd))
69 self.assertNotEquals(0, call(cmd + [
'//',
'input']))
71 if __name__ ==
"__main__":
73 rostest.unitrun(PKG,
'topic_tools_arg_parsing', TopicToolsTestCase)