Correct PYPY bit logic in previous commit

This commit is contained in:
rocky
2016-08-27 20:19:12 -04:00
parent f47aecae9f
commit da458bdce7
2 changed files with 5 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ from fnmatch import fnmatch
TEST_VERSIONS=('2.3.7', '2.4.6', '2.5.6', '2.6.9',
'pypy-2.4.0', 'pypy-2.6.1',
'pypy-5.0.1', 'pypy-5.3.1',
'2.7.10', '2.7.11',
'2.7.10', '2.7.11', '2.7.12',
'3.2.6', '3.3.5', '3.4.2', '3.5.1')
target_base = '/tmp/py-dis/'

View File

@@ -337,9 +337,11 @@ def cmp_code_objects(version, is_pypy, code_obj1, code_obj2, name=''):
for c1, c2 in zip(codes1, codes2):
cmp_code_objects(version, is_pypy, c1, c2, name=name)
elif member == 'co_flags':
# For PYPY for now we don't care about PYPY_SOURCE_IS_UTF8:
flags1 = code_obj1.co_flags | 0x0100 # PYPY_SOURCE_IS_UTF8
flags1 = code_obj1.co_flags
flags2 = code_obj2.co_flags
if is_pypy:
# For PYPY for now we don't care about PYPY_SOURCE_IS_UTF8:
flags2 &= ~0x0100 # PYPY_SOURCE_IS_UTF8
if flags1 != flags2:
raise CmpErrorMember(name, 'co_flags',
pretty_flags(flags1),