You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
LOAD assert needs to be on 3.x...
Expand testing
This commit is contained in:
@@ -41,14 +41,17 @@ check-3.1: check-bytecode
|
|||||||
#: Run working tests from Python 3.2
|
#: Run working tests from Python 3.2
|
||||||
check-3.2: check-bytecode
|
check-3.2: check-bytecode
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify $(COMPILE)
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
|
||||||
|
|
||||||
#: Run working tests from Python 3.3
|
#: Run working tests from Python 3.3
|
||||||
check-3.3: check-bytecode
|
check-3.3: check-bytecode
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify $(COMPILE)
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.3-run --verify-run
|
||||||
|
|
||||||
#: Run working tests from Python 3.4
|
#: Run working tests from Python 3.4
|
||||||
check-3.4: check-bytecode check-3.4-ok check-2.7-ok
|
check-3.4: check-bytecode check-3.4-ok check-2.7-ok
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify $(COMPILE)
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.4-run --verify-run
|
||||||
|
|
||||||
#: Run working tests from Python 3.5
|
#: Run working tests from Python 3.5
|
||||||
check-3.5: check-bytecode
|
check-3.5: check-bytecode
|
||||||
@@ -202,6 +205,7 @@ check-bytecode-3.1:
|
|||||||
#: Check deparsing Python 3.2
|
#: Check deparsing Python 3.2
|
||||||
check-bytecode-3.2:
|
check-bytecode-3.2:
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify
|
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
|
||||||
|
|
||||||
#: Check deparsing Python 3.3
|
#: Check deparsing Python 3.3
|
||||||
check-bytecode-3.3:
|
check-bytecode-3.3:
|
||||||
|
Binary file not shown.
BIN
test/bytecode_3.2_run/15_assert.pyc
Normal file
BIN
test/bytecode_3.2_run/15_assert.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
test/bytecode_3.3_run/15_assert.pyc
Normal file
BIN
test/bytecode_3.3_run/15_assert.pyc
Normal file
Binary file not shown.
@@ -1,3 +1,7 @@
|
|||||||
|
# RUNNABLE!
|
||||||
|
|
||||||
|
# But if it miscompiles one of the tests may loop forever
|
||||||
|
|
||||||
# Tests:
|
# Tests:
|
||||||
# 2.7:
|
# 2.7:
|
||||||
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
# assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1
|
||||||
@@ -16,7 +20,7 @@ for method_name in ['a']:
|
|||||||
if method_name in ('b',):
|
if method_name in ('b',):
|
||||||
method = 'a'
|
method = 'a'
|
||||||
else:
|
else:
|
||||||
assert 0, "instance installed"
|
assert True, "instance installed"
|
||||||
|
|
||||||
methods = 'b'
|
methods = 'b'
|
||||||
|
|
||||||
@@ -25,5 +29,17 @@ for method_name in ['a']:
|
|||||||
# if not not do_setlocal:
|
# if not not do_setlocal:
|
||||||
# raise AssertError
|
# raise AssertError
|
||||||
|
|
||||||
|
# Hmmm.. this isn't strickly a bug
|
||||||
|
|
||||||
def getpreferredencoding(do_setlocale=True):
|
def getpreferredencoding(do_setlocale=True):
|
||||||
assert not do_setlocale
|
assert not do_setlocale
|
||||||
|
|
||||||
|
getpreferredencoding(False)
|
||||||
|
|
||||||
|
# From python 3.3 idlelib/PyParse.py
|
||||||
|
def _study1(i):
|
||||||
|
while i:
|
||||||
|
assert i
|
||||||
|
continue
|
||||||
|
|
||||||
|
_study1(False)
|
||||||
|
@@ -123,6 +123,7 @@ class Python3Parser(PythonParser):
|
|||||||
stmt ::= classdefdeco
|
stmt ::= classdefdeco
|
||||||
classdefdeco ::= classdefdeco1 store
|
classdefdeco ::= classdefdeco1 store
|
||||||
|
|
||||||
|
expr ::= LOAD_ASSERT
|
||||||
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 COME_FROM
|
assert ::= assert_expr jmp_true LOAD_ASSERT RAISE_VARARGS_1 COME_FROM
|
||||||
|
|
||||||
assert_expr ::= expr
|
assert_expr ::= expr
|
||||||
|
@@ -31,6 +31,9 @@ class Python34Parser(Python33Parser):
|
|||||||
expr ::= LOAD_ASSERT
|
expr ::= LOAD_ASSERT
|
||||||
|
|
||||||
|
|
||||||
|
# passtmt is needed for semantic actions to add "pass"
|
||||||
|
suite_stmts_opt ::= pass
|
||||||
|
|
||||||
# Seems to be needed starting 3.4.4 or so
|
# Seems to be needed starting 3.4.4 or so
|
||||||
while1stmt ::= SETUP_LOOP l_stmts
|
while1stmt ::= SETUP_LOOP l_stmts
|
||||||
COME_FROM JUMP_BACK POP_BLOCK COME_FROM_LOOP
|
COME_FROM JUMP_BACK POP_BLOCK COME_FROM_LOOP
|
||||||
|
Reference in New Issue
Block a user