diff options
| author | Camille Mougey <commial@gmail.com> | 2019-03-07 14:37:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-07 14:37:07 +0100 |
| commit | 4c2320b46250a8d6f8774e1218544b72a154cd8e (patch) | |
| tree | b67e7b072439f84109bd39dad8ed7f3f135224f8 /test/core/parse_asm.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| parent | 26c1075723a02984da6d3bc7423c5c0c43082dc3 (diff) | |
| download | miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.tar.gz miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.zip | |
Merge pull request #990 from serpilliere/support_python2_python3
Support python2 python3
Diffstat (limited to 'test/core/parse_asm.py')
| -rwxr-xr-x | test/core/parse_asm.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/core/parse_asm.py b/test/core/parse_asm.py index ddb195d2..ab2bca4a 100755 --- a/test/core/parse_asm.py +++ b/test/core/parse_asm.py @@ -1,14 +1,15 @@ #! /usr/bin/env python2 #-*- coding:utf-8 -*- +from builtins import range import unittest class TestParseAsm(unittest.TestCase): def test_ParseTxt(self): - from miasm2.arch.x86.arch import mn_x86 - from miasm2.core.parse_asm import parse_txt + from miasm.arch.x86.arch import mn_x86 + from miasm.core.parse_asm import parse_txt ASM0 = ''' ; @@ -36,9 +37,9 @@ class TestParseAsm(unittest.TestCase): self.assertRaises(ValueError, parse_txt, mn_x86, 32, ASM1) def test_DirectiveDontSplit(self): - from miasm2.arch.x86.arch import mn_x86 - from miasm2.core.parse_asm import parse_txt - from miasm2.core.asmblock import asm_resolve_final + from miasm.arch.x86.arch import mn_x86 + from miasm.core.parse_asm import parse_txt + from miasm.core.asmblock import asm_resolve_final ASM0 = ''' lbl0: @@ -69,7 +70,7 @@ class TestParseAsm(unittest.TestCase): asmcfg, loc_db) lbls = [] - for i in xrange(6): + for i in range(6): lbls.append(loc_db.get_name_location('lbl%d' % i)) # align test offset = loc_db.get_location_offset(lbls[5]) @@ -84,8 +85,8 @@ class TestParseAsm(unittest.TestCase): assert(lbls[5] == lbl2block[lbls[4]].get_next()) def test_DirectiveSplit(self): - from miasm2.arch.x86.arch import mn_x86 - from miasm2.core.parse_asm import parse_txt + from miasm.arch.x86.arch import mn_x86 + from miasm.core.parse_asm import parse_txt ASM0 = ''' lbl0: @@ -97,7 +98,7 @@ class TestParseAsm(unittest.TestCase): asmcfg, loc_db = parse_txt(mn_x86, 32, ASM0) lbls = [] - for i in xrange(2): + for i in range(2): lbls.append(loc_db.get_name_location('lbl%d' % i)) lbl2block = {} for block in asmcfg.blocks: |