Remove unnecessary use of re.
import benchexec.result as result
import benchexec.tools.template
-import re
class Tool(benchexec.tools.template.BaseTool2):
@@ -27,8 +26,7 @@ class Tool(benchexec.tools.template.BaseTool2):
return version_string.partition("version")[2].strip().split(" ")[0]
def _code_matches_tool_output(self, tool_output, exit_code):
- pattern = re.compile(rf"Exit code: {exit_code}")
- if pattern.match(tool_output[-1]):
+ if tool_output[-1] == "Exit code: {}".format(exit_code):
return True
return False
