You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Add bytecode 1.4 small tests
Many bugs in 1.4 exist. For a future release
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clean_pyc nosetests \
|
||||
check-bytecode-1.5 check-bytecode-1 check-bytecode-2 check-bytecode-3 \
|
||||
check-bytecode-1 check-bytecode-1.4 check-bytecode-1.5 \
|
||||
check-bytecode-2 check-bytecode-3 \
|
||||
check-bytecode-2.2 check-byteocde-2.3 check-bytecode-2.4 \
|
||||
check-short check-2.6 check-2.7 check-3.0 check-3.1 check-3.2 check-3.3 \
|
||||
check-3.4 check-3.5 check-3.6 check-3.7 check-5.6 5.6 5.8 \
|
||||
@@ -76,7 +77,7 @@ check-disasm:
|
||||
$(PYTHON) dis-compare.py
|
||||
|
||||
#: Check deparsing bytecode 1.x only
|
||||
check-bytecode-1: check-bytecode-1.5
|
||||
check-bytecode-1: check-bytecode-1.4 check-bytecode-1.5
|
||||
|
||||
#: Check deparsing bytecode 2.x only
|
||||
check-bytecode-2:
|
||||
@@ -93,11 +94,17 @@ check-bytecode-3:
|
||||
#: Check deparsing bytecode that works running Python 2 and Python 3
|
||||
check-bytecode: check-bytecode-3
|
||||
$(PYTHON) test_pythonlib.py \
|
||||
--bytecode-1.4 --bytecode-1.5 \
|
||||
--bytecode-2.2 --bytecode-2.3 --bytecode-2.4 \
|
||||
--bytecode-2.1 --bytecode-2.2 --bytecode-2.3 --bytecode-2.4 \
|
||||
--bytecode-2.5 --bytecode-2.6 --bytecode-2.7 \
|
||||
--bytecode-pypy2.7
|
||||
|
||||
|
||||
#: Check deparsing bytecode 1.4 only
|
||||
check-bytecode-1.4:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-1.4
|
||||
|
||||
#: Check deparsing bytecode 1.5 only
|
||||
check-bytecode-1.5:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-1.5
|
||||
|
BIN
test/bytecode_1.4/test_class-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_class-1.4.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/test_del-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_del-1.4.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/test_docstring-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_docstring-1.4.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/test_empty-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_empty-1.4.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/test_global-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_global-1.4.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/test_globals-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_globals-1.4.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_1.4/test_single_stmt-1.4.pyc
Normal file
BIN
test/bytecode_1.4/test_single_stmt-1.4.pyc
Normal file
Binary file not shown.
@@ -78,7 +78,7 @@ for vers in (2.7, 3.4, 3.5, 3.6):
|
||||
test_options[key] = (os.path.join(src_dir, pythonlib), PYOC, key, vers)
|
||||
pass
|
||||
|
||||
for vers in (1.5,
|
||||
for vers in (1.4, 1.5,
|
||||
2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
|
||||
3.0, 3.1, 3.2, 3.3,
|
||||
3.4, 3.5, 3.6, 3.7, 'pypy3.2', 'pypy2.7'):
|
||||
|
@@ -12,6 +12,7 @@ class Python14Parser(Python15Parser):
|
||||
# RAISE_EXCEPTION, BUILD_FUNCTION, UNPACK_ARG, UNPACK_VARARG, LOAD_LOCAL,
|
||||
# SET_FUNC_ARGS, and RESERVE_FAST
|
||||
"""
|
||||
|
||||
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
|
||||
super(Python14Parser, self).__init__(debug_parser)
|
||||
self.customized = {}
|
||||
|
@@ -25,3 +25,12 @@ class Scanner14(scan.Scanner15):
|
||||
self.version = 1.4
|
||||
self.genexpr_name = '<generator expression>'
|
||||
return
|
||||
|
||||
# def ingest22(self, co, classname=None, code_objects={}, show_asm=None):
|
||||
# tokens, customize = self.parent_ingest(co, classname, code_objects, show_asm)
|
||||
# tokens = [t for t in tokens if t.kind != 'SET_LINENO']
|
||||
|
||||
# # for t in tokens:
|
||||
# # print(t)
|
||||
|
||||
return tokens, customize
|
||||
|
Reference in New Issue
Block a user