Test optimized Python code and Python 3.2

This commit is contained in:
rocky
2016-04-30 06:54:01 -04:00
parent f3a4e6ee54
commit 4aa703d727
9 changed files with 28 additions and 8 deletions

View File

@@ -87,7 +87,11 @@ check-native-short:
check-2.7-ok:
$(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:
$(PYTHON) test_pythonlib.py --ok-3.4 --verify $(COMPILE)

Binary file not shown.

BIN
test/ok_lib2.7/_abcoll.pyc Normal file

Binary file not shown.

BIN
test/ok_lib2.7/_abcoll.pyo Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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

View File

@@ -55,25 +55,28 @@ PYO = ('*.pyo', )
PYOC = ('*.pyc', '*.pyo')
test_options = {
# name: (src_basedir, pattern, output_base_suffix, pythoin_version)
# name: (src_basedir, pattern, output_base_suffix, python_version)
'test':
('test', PYC, 'test'),
'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'),
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'),
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
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
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
if vers >= 3.0:
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)
#-----