Browse Source

tooltest2.py: minor fix

The MMGen Project 4 years ago
parent
commit
15a5de5e94
1 changed files with 2 additions and 8 deletions
  1. 2 8
      test/tooltest2.py

+ 2 - 8
test/tooltest2.py

@@ -868,19 +868,13 @@ async def run_test(gid,cmd_name):
 			return ret
 
 	def tool_api(cmd_name,args,out,opts):
-		from mmgen.tool import tool_api
+		from mmgen.tool import tool_api,_process_args
 		tool = tool_api()
 		if opts:
 			for o in opts:
 				if o.startswith('--type='):
 					tool.addrtype = o.split('=')[1]
-		pargs,kwargs = [],{}
-		for a in args:
-			if '=' in a:
-				a1,a2 = a.split('=')
-				kwargs[a1] = int(a2) if is_int(a2) else a2
-			else:
-				pargs.append(a)
+		pargs,kwargs = _process_args(cmd_name,args)
 		return getattr(tool,cmd_name)(*pargs,**kwargs)
 
 	for d in data: