about summary refs log tree commit diff stats
path: root/test/arch/mep/jit/ut_helpers_jit.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/arch/mep/jit/ut_helpers_jit.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/arch/mep/jit/ut_helpers_jit.py')
-rw-r--r--test/arch/mep/jit/ut_helpers_jit.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/arch/mep/jit/ut_helpers_jit.py b/test/arch/mep/jit/ut_helpers_jit.py
index 590c534f..0c756e39 100644
--- a/test/arch/mep/jit/ut_helpers_jit.py
+++ b/test/arch/mep/jit/ut_helpers_jit.py
@@ -1,19 +1,21 @@
 # Toshiba MeP-c4 - unit tests helpers
 # Guillaume Valadon <guillaume@valadon.net>
 
-from miasm2.analysis.machine import Machine
-from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE
+from __future__ import print_function
+
+from miasm.analysis.machine import Machine
+from miasm.jitter.csts import PAGE_READ, PAGE_WRITE
 
 
 def jit_instructions(mn_str):
     """JIT instructions and return the jitter object."""
 
-    # Get the miasm2 Machine
+    # Get the miasm Machine
     machine = Machine("mepb")
     mn_mep = machine.mn()
 
     # Assemble the instructions
-    asm = ""
+    asm = b""
     for instr_str in mn_str.split("\n"):
         instr = mn_mep.fromstring(instr_str, "b")
         instr.mode = "b"
@@ -40,10 +42,10 @@ def launch_tests(obj):
     test_methods = [name for name in dir(obj) if name.startswith("test")]
 
     for method in test_methods:
-        print method
+        print(method)
         try:
             getattr(obj, method)()
         except AttributeError as e:
-            print "Method not found: %s" % method
+            print("Method not found: %s" % method)
             assert(False)
-        print '-' * 42
+        print('-' * 42)