Skip to content

Commit

Permalink
suite: better support for Python3 for test_group_name.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Apr 26, 2015
1 parent c1d9786 commit ac6be47
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions suite/test_group_name.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/python

from capstone import *
from capstone.arm import *
from capstone.arm64 import *
Expand All @@ -21,13 +23,14 @@ def __init__(self, name, arch, mode, data):
self.data = data

def run(self):
print 'Testing', self.name
print('Testing %s' %self.name)
cap = Cs(self.arch, self.mode)
for group_id in xrange(0,255):
name = self.data.get(group_id)
res = _cs.cs_group_name(cap.csh, group_id)
if res != name:
print 'ERROR: expected', name, 'got', res
print("ERROR: expected '%s', but got '%s'" %(name, res))
print("")

arm_dict = {
ARM_GRP_JUMP: "jump",
Expand Down Expand Up @@ -225,5 +228,5 @@ def run(self):
if all or t.name in args:
t.run()
else:
print 'Skipping', t.name
print('Skipping %s' %t.name)

1 comment on commit ac6be47

@learn-more
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, i did not have python3 installed and was wanting to ask if everything i did was compatible.

Please sign in to comment.