You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Frank Ebersoll's grammar fix to make "assert isinstance(1, int)" work.
This commit is contained in:
@@ -37,9 +37,14 @@ check-bytecode:
|
|||||||
check-native-short:
|
check-native-short:
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION) --verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION) --verify $(COMPILE)
|
||||||
|
|
||||||
|
#: Short, quickly-running Python 2.7 programs. Useful in debugging grammar problems
|
||||||
check-short-2.7:
|
check-short-2.7:
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-2.7 --verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-2.7 --verify $(COMPILE)
|
||||||
|
|
||||||
|
#: Short, quickly-running Python 2.7 programs. Useful in debugging grammar problems
|
||||||
|
check-short-3.4:
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.4 --verify $(COMPILE)
|
||||||
|
|
||||||
#: Run longer Python 2.7's lib files known to be okay
|
#: Run longer Python 2.7's lib files known to be okay
|
||||||
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)
|
||||||
|
1
test/bytecode_2.5/README
Normal file
1
test/bytecode_2.5/README
Normal file
@@ -0,0 +1 @@
|
|||||||
|
These are byte-compiled programs compiled by Python 2.5
|
BIN
test/bytecode_2.6/if.pyc
Normal file
BIN
test/bytecode_2.6/if.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.6/ifelse.pyc
Normal file
BIN
test/bytecode_2.6/ifelse.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.7/assert.pyc
Normal file
BIN
test/bytecode_2.7/assert.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.7/assign.pyc
Normal file
BIN
test/bytecode_2.7/assign.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.4/assign.pyc
Normal file
BIN
test/bytecode_3.4/assign.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -55,8 +55,10 @@ tests['2.3'] = tests['2.2']
|
|||||||
tests['2.5'] = tests['2.3']
|
tests['2.5'] = tests['2.3']
|
||||||
# tests['2.7'] = ['mine'] + tests['2.6']
|
# tests['2.7'] = ['mine'] + tests['2.6']
|
||||||
tests['2.7'] = [
|
tests['2.7'] = [
|
||||||
'simple-source/branching/ifelse',
|
# 'simple-source/branching/ifelse',
|
||||||
'simple-source/branching/if'
|
# 'simple-source/branching/if'
|
||||||
|
'simple-source/misc/assert',
|
||||||
|
'simple-source/misc/assign',
|
||||||
# 'simple-source/call_arguments/keyword',
|
# 'simple-source/call_arguments/keyword',
|
||||||
# 'simple-source/call_arguments/positional'
|
# 'simple-source/call_arguments/positional'
|
||||||
]
|
]
|
||||||
|
5
test/simple-source/misc/assert.py
Normal file
5
test/simple-source/misc/assert.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Tests:
|
||||||
|
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
||||||
|
# callfunction ::= ...
|
||||||
|
|
||||||
|
assert isinstance(1, int)
|
4
test/simple-source/misc/assign.py
Normal file
4
test/simple-source/misc/assign.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Tests:
|
||||||
|
# assign ::= expr designator
|
||||||
|
|
||||||
|
vario = 556
|
@@ -505,7 +505,6 @@ class Python2Parser(PythonParser):
|
|||||||
expr ::= LOAD_FAST
|
expr ::= LOAD_FAST
|
||||||
expr ::= LOAD_NAME
|
expr ::= LOAD_NAME
|
||||||
expr ::= LOAD_CONST
|
expr ::= LOAD_CONST
|
||||||
expr ::= LOAD_ASSERT
|
|
||||||
expr ::= LOAD_GLOBAL
|
expr ::= LOAD_GLOBAL
|
||||||
expr ::= LOAD_DEREF
|
expr ::= LOAD_DEREF
|
||||||
expr ::= LOAD_LOCALS
|
expr ::= LOAD_LOCALS
|
||||||
|
@@ -505,7 +505,6 @@ class Python3Parser(PythonParser):
|
|||||||
expr ::= LOAD_FAST
|
expr ::= LOAD_FAST
|
||||||
expr ::= LOAD_NAME
|
expr ::= LOAD_NAME
|
||||||
expr ::= LOAD_CONST
|
expr ::= LOAD_CONST
|
||||||
expr ::= LOAD_ASSERT
|
|
||||||
expr ::= LOAD_GLOBAL
|
expr ::= LOAD_GLOBAL
|
||||||
expr ::= LOAD_DEREF
|
expr ::= LOAD_DEREF
|
||||||
expr ::= LOAD_LOCALS
|
expr ::= LOAD_LOCALS
|
||||||
|
Reference in New Issue
Block a user