about summary refs log tree commit diff stats
path: root/test/core/utils.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2019-03-07 14:37:07 +0100
committerGitHub <noreply@github.com>2019-03-07 14:37:07 +0100
commit4c2320b46250a8d6f8774e1218544b72a154cd8e (patch)
treeb67e7b072439f84109bd39dad8ed7f3f135224f8 /test/core/utils.py
parenteab809932871f91d6f4aa770fc321af9e156e0f5 (diff)
parent26c1075723a02984da6d3bc7423c5c0c43082dc3 (diff)
downloadmiasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.tar.gz
miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.zip
Merge pull request #990 from serpilliere/support_python2_python3
Support python2 python3
Diffstat (limited to 'test/core/utils.py')
-rwxr-xr-xtest/core/utils.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/utils.py b/test/core/utils.py
index b506f904..0ca64f4e 100755
--- a/test/core/utils.py
+++ b/test/core/utils.py
@@ -2,17 +2,19 @@
 
 #-*- coding:utf-8 -*-
 
+from __future__ import print_function
+from builtins import range
 import unittest
 
 
 class TestUtils(unittest.TestCase):
 
     def test_boundedDict(self):
-        from miasm2.core.utils import BoundedDict
+        from miasm.core.utils import BoundedDict
 
         # Use a callback
         def logger(key):
-            print "DELETE", key
+            print("DELETE", key)
 
         # Create a 5/2 dictionary
         bd = BoundedDict(5, 2, initialdata={"element": "value"},
@@ -26,9 +28,9 @@ class TestUtils(unittest.TestCase):
         # Increase 'element2' use
         _ = bd["element2"]
 
-        for i in xrange(6):
+        for i in range(6):
             bd[i] = i
-            print "Insert %d -> %s" % (i, bd)
+            print("Insert %d -> %s" % (i, bd))
 
         assert(len(bd) == 2)