about summary refs log tree commit diff stats
path: root/test/core/parse_asm.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2019-02-25 11:09:54 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2019-03-05 16:52:49 +0100
commit02bbb30efea4980c9d133947cbbf69fb599071ad (patch)
tree3fea6826fcc5354840a27cb1dc99ff31eef81896 /test/core/parse_asm.py
parenteab809932871f91d6f4aa770fc321af9e156e0f5 (diff)
downloadfocaccia-miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz
focaccia-miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip
Support python2/python3
Diffstat (limited to 'test/core/parse_asm.py')
-rwxr-xr-xtest/core/parse_asm.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/parse_asm.py b/test/core/parse_asm.py
index ddb195d2..ade9040d 100755
--- a/test/core/parse_asm.py
+++ b/test/core/parse_asm.py
@@ -1,6 +1,7 @@
 #! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
+from builtins import range
 import unittest
 
 
@@ -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])
@@ -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: