diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/analysis/depgraph.py | 4 | ||||
| -rw-r--r-- | test/arch/mep/asm/ut_helpers_asm.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/analysis/depgraph.py b/test/analysis/depgraph.py index 57a73a5f..9760e717 100644 --- a/test/analysis/depgraph.py +++ b/test/analysis/depgraph.py @@ -108,7 +108,7 @@ class IRATest(LifterModelCall): def bloc2graph(irgraph, label=False, lines=True): """Render dot graph of @blocks""" - escape_chars = re.compile('[' + re.escape('{}') + ']') + escape_chars = re.compile(r'[\{\}]') label_attr = 'colspan="2" align="center" bgcolor="grey"' edge_attr = 'label = "%s" color="%s" style="bold"' td_attr = 'align="left"' @@ -179,7 +179,7 @@ def bloc2graph(irgraph, label=False, lines=True): def dg2graph(graph, label=False, lines=True): """Render dot graph of @blocks""" - escape_chars = re.compile('[' + re.escape('{}') + ']') + escape_chars = re.compile(r'[\{\}]') label_attr = 'colspan="2" align="center" bgcolor="grey"' edge_attr = 'label = "%s" color="%s" style="bold"' td_attr = 'align="left"' diff --git a/test/arch/mep/asm/ut_helpers_asm.py b/test/arch/mep/asm/ut_helpers_asm.py index 9f6dc5c2..2ebd0622 100644 --- a/test/arch/mep/asm/ut_helpers_asm.py +++ b/test/arch/mep/asm/ut_helpers_asm.py @@ -27,7 +27,7 @@ def check_instruction(mn_str, mn_hex, multi=None, offset=0): """Try to disassemble and assemble this instruction""" # Rename objdump registers names - mn_str = re.sub("\$([0-9]+)", lambda m: "R"+m.group(1), mn_str) + mn_str = re.sub(r"\$([0-9]+)", lambda m: "R"+m.group(1), mn_str) mn_str = mn_str.replace("$", "") # Disassemble |