You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Test optimized Python code and Python 3.2
This commit is contained in:
@@ -87,7 +87,11 @@ check-native-short:
|
|||||||
check-2.7-ok:
|
check-2.7-ok:
|
||||||
$(PYTHON) test_pythonlib.py --ok-2.7 --verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --ok-2.7 --verify $(COMPILE)
|
||||||
|
|
||||||
#: Run longer Python 2.7's lib files known to be okay
|
#: Run longer Python 3.2's lib files known to be okay
|
||||||
|
check-3.2-ok:
|
||||||
|
$(PYTHON) test_pythonlib.py --ok-3.2 --verify $(COMPILE)
|
||||||
|
|
||||||
|
#: Run longer Python 3.4's lib files known to be okay
|
||||||
check-3.4-ok:
|
check-3.4-ok:
|
||||||
$(PYTHON) test_pythonlib.py --ok-3.4 --verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --ok-3.4 --verify $(COMPILE)
|
||||||
|
|
||||||
|
BIN
test/bytecode_3.5/06_classbug.pyc
Normal file
BIN
test/bytecode_3.5/06_classbug.pyc
Normal file
Binary file not shown.
BIN
test/ok_lib2.7/_abcoll.pyc
Normal file
BIN
test/ok_lib2.7/_abcoll.pyc
Normal file
Binary file not shown.
BIN
test/ok_lib2.7/_abcoll.pyo
Normal file
BIN
test/ok_lib2.7/_abcoll.pyo
Normal file
Binary file not shown.
BIN
test/ok_lib2.7/antigravity.pyo
Normal file
BIN
test/ok_lib2.7/antigravity.pyo
Normal file
Binary file not shown.
BIN
test/ok_lib3.2/antigravity.cpython-32.pyc
Normal file
BIN
test/ok_lib3.2/antigravity.cpython-32.pyc
Normal file
Binary file not shown.
BIN
test/ok_lib3.2/antigravity.cpython-32.pyo
Normal file
BIN
test/ok_lib3.2/antigravity.cpython-32.pyo
Normal file
Binary file not shown.
13
test/simple_source/def/06_classbug.py
Normal file
13
test/simple_source/def/06_classbug.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Python 3.2 Bug from abc.py
|
||||||
|
|
||||||
|
# Make sure we handle:
|
||||||
|
|
||||||
|
# LOAD_FAST '__locals__'
|
||||||
|
# STORE_LOCALS ''
|
||||||
|
|
||||||
|
class abstractclassmethod(object):
|
||||||
|
"""A Python 3.2 STORE_LOCALS bug
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, callable):
|
||||||
|
callable.__isabstractmethod__ = True
|
@@ -55,25 +55,28 @@ PYO = ('*.pyo', )
|
|||||||
PYOC = ('*.pyc', '*.pyo')
|
PYOC = ('*.pyc', '*.pyo')
|
||||||
|
|
||||||
test_options = {
|
test_options = {
|
||||||
# name: (src_basedir, pattern, output_base_suffix, pythoin_version)
|
# name: (src_basedir, pattern, output_base_suffix, python_version)
|
||||||
'test':
|
'test':
|
||||||
('test', PYC, 'test'),
|
('test', PYC, 'test'),
|
||||||
|
|
||||||
'ok-2.6':
|
'ok-2.6':
|
||||||
(os.path.join(src_dir, 'ok_2.6'),
|
(os.path.join(src_dir, 'ok_2.6'),
|
||||||
PYC, 'ok-2.6', 2.6),
|
PYOC, 'ok-2.6', 2.6),
|
||||||
|
|
||||||
'ok-2.7': (os.path.join(src_dir, 'ok_lib2.7'),
|
'ok-2.7': (os.path.join(src_dir, 'ok_lib2.7'),
|
||||||
PYC, 'ok-2.7', 2.7),
|
PYOC, 'ok-2.7', 2.7),
|
||||||
|
|
||||||
|
'ok-3.2': (os.path.join(src_dir, 'ok_lib3.2'),
|
||||||
|
PYOC, 'ok-3.2', 3.5),
|
||||||
|
|
||||||
'base-2.7': (os.path.join(src_dir, 'base_tests', 'python2.7'),
|
'base-2.7': (os.path.join(src_dir, 'base_tests', 'python2.7'),
|
||||||
PYC, 'base_2.7', 2.7),
|
PYOC, 'base_2.7', 2.7),
|
||||||
}
|
}
|
||||||
|
|
||||||
for vers in (2.7, 3.4):
|
for vers in (2.7, 3.4, 3.5):
|
||||||
pythonlib = "ok_lib%s" % vers
|
pythonlib = "ok_lib%s" % vers
|
||||||
key = "ok-%s" % vers
|
key = "ok-%s" % vers
|
||||||
test_options[key] = (os.path.join(src_dir, pythonlib), PYC, key, vers)
|
test_options[key] = (os.path.join(src_dir, pythonlib), PYOC, key, vers)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
for vers in (2.5, 2.6, 2.7, 3.2, 3.3, 3.4, 3.5):
|
for vers in (2.5, 2.6, 2.7, 3.2, 3.3, 3.4, 3.5):
|
||||||
@@ -84,7 +87,7 @@ for vers in (2.5, 2.6, 2.7, 3.2, 3.3, 3.4, 3.5):
|
|||||||
pythonlib = "python%s" % vers
|
pythonlib = "python%s" % vers
|
||||||
if vers >= 3.0:
|
if vers >= 3.0:
|
||||||
pythonlib = os.path.join(pythonlib, '__pycache__')
|
pythonlib = os.path.join(pythonlib, '__pycache__')
|
||||||
test_options[key] = (os.path.join(lib_prefix, pythonlib), PYC, pythonlib, vers)
|
test_options[key] = (os.path.join(lib_prefix, pythonlib), PYOC, pythonlib, vers)
|
||||||
|
|
||||||
#-----
|
#-----
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user