예제 #1
0
 def test_fullusage(self):
     from ros import rosnode
     try:
         rosnode._fullusage()
     except SystemExit: pass
     try:
         rosnode.rosnodemain(['rosnode'])
     except SystemExit: pass
     try:
         rosnode.rosnodemain(['rosnode', 'invalid'])        
     except SystemExit: pass
예제 #2
0
 def test_rosnode_usage(self):
     from ros import rosnode
     cmd = 'rosnode'
     for c in ['ping', 'list', 'info', 'machine', 'cleanup', 'kill']:
         try:
             with fakestdout() as b:
                 rosnode.rosnodemain([cmd, c, '-h'])
                 self.assert_("usage" in b.getvalue())
             self.fail("should have exited on usage")
         except SystemExit, e:
             self.assertEquals(0, e.code)
예제 #3
0
 def test_rosnode_usage(self):
     from ros import rosnode
     cmd = 'rosnode'
     for c in ['ping', 'list', 'info', 'machine', 'cleanup', 'kill']:
         try:
             with fakestdout() as b:
                 rosnode.rosnodemain([cmd, c, '-h'])
                 self.assert_("usage" in b.getvalue())
             self.fail("should have exited on usage")
         except SystemExit, e:
             self.assertEquals(0, e.code)
예제 #4
0
 def test_fullusage(self):
     from ros import rosnode
     try:
         rosnode._fullusage()
     except SystemExit:
         pass
     try:
         rosnode.rosnodemain(['rosnode'])
     except SystemExit:
         pass
     try:
         rosnode.rosnodemain(['rosnode', 'invalid'])
     except SystemExit:
         pass