From eff20687a8c7a73d6446173c09f2a4e1f713c39e Mon Sep 17 00:00:00 2001 From: XiaGuochao Date: Mon, 23 Mar 2020 16:10:03 +0800 Subject: [PATCH] Fix the bug when replacing compare and remove redundant code --- test/maple_test/task.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/maple_test/task.py b/test/maple_test/task.py index 34071d2933..02f5466305 100644 --- a/test/maple_test/task.py +++ b/test/maple_test/task.py @@ -447,16 +447,7 @@ def format_compare_command(raw_command, compare_cmd): prev_char = "" else: prev_char = raw_command[start - 1] - if end == len(raw_command): - next_char = "" - else: - next_char = raw_command[end] - if ( - prev_char.isalnum() - or prev_char == "_" - or next_char.isalnum() - or next_char == "_" - ): + if prev_char.isalnum() or prev_char == "_": continue else: raw_command = raw_command[:start] + compare_cmd + raw_command[end:] -- Gitee