diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-25 11:09:54 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-03-05 16:52:49 +0100 |
| commit | 02bbb30efea4980c9d133947cbbf69fb599071ad (patch) | |
| tree | 3fea6826fcc5354840a27cb1dc99ff31eef81896 /test/core/utils.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| download | miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip | |
Support python2/python3
Diffstat (limited to 'test/core/utils.py')
| -rwxr-xr-x | test/core/utils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/core/utils.py b/test/core/utils.py index b506f904..6f69fdf1 100755 --- a/test/core/utils.py +++ b/test/core/utils.py @@ -2,6 +2,8 @@ #-*- coding:utf-8 -*- +from __future__ import print_function +from builtins import range import unittest @@ -12,7 +14,7 @@ class TestUtils(unittest.TestCase): # 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) |