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/arch/x86/unit/asm_test.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| download | miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip | |
Support python2/python3
Diffstat (limited to 'test/arch/x86/unit/asm_test.py')
| -rw-r--r-- | test/arch/x86/unit/asm_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/arch/x86/unit/asm_test.py b/test/arch/x86/unit/asm_test.py index 91da1942..a87fe278 100644 --- a/test/arch/x86/unit/asm_test.py +++ b/test/arch/x86/unit/asm_test.py @@ -1,6 +1,10 @@ +from builtins import str +from builtins import object import sys import os +from future.utils import viewitems + from miasm2.arch.x86.arch import mn_x86, base_expr, variable from miasm2.core import parse_asm from miasm2.expression.expression import * @@ -46,10 +50,10 @@ class Asm_Test(object): loc_db.set_location_offset(loc_db.get_name_location("main"), 0x0) s = StrPatchwork() patches = asmblock.asm_resolve_final(mn_x86, blocks, loc_db) - for offset, raw in patches.items(): + for offset, raw in viewitems(patches): s[offset] = raw - s = str(s) + s = bytes(s) self.assembly = s def check(self): |