about summary refs log tree commit diff stats
path: root/test/core/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/utils.py')
-rwxr-xr-xtest/core/utils.py8
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)