You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Add tests for x0ret's recent varrg fixes
This commit is contained in:
Binary file not shown.
BIN
test/bytecode_3.4_run/04_def_annotate.pyc
Normal file
BIN
test/bytecode_3.4_run/04_def_annotate.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -31,9 +31,22 @@ def test9(arg_1=55, *varargs: int, y=5, **kwargs):
|
||||
def test10(args_1, b: 'annotating b', c: int) -> float:
|
||||
return 5.4
|
||||
|
||||
class IOBase:
|
||||
def test11(*, name):
|
||||
return args, name
|
||||
|
||||
def test12(a, *args, name):
|
||||
return a, args
|
||||
pass
|
||||
|
||||
def test13(*args, name):
|
||||
return args, name
|
||||
|
||||
def test14(*args, name: int=1, qname):
|
||||
return args, name, qname
|
||||
|
||||
def test15(*args, name='S', fname, qname=4):
|
||||
return args, name, fname, qname
|
||||
|
||||
# Python 3.1 _pyio.py uses the -> "IOBase" annotation
|
||||
def o(f, mode = "r", buffering = None) -> "IOBase":
|
||||
return (f, mode, buffering)
|
||||
@@ -121,3 +134,8 @@ assert test6(2.3, 4, 5) == (2.3, 4, 5)
|
||||
|
||||
ann1(1, 'test', 5)
|
||||
ann2(1)
|
||||
|
||||
### FIXME: fill in...
|
||||
|
||||
assert test12(1, 2, 3, name='hi') == (1, (2, 3)), "a, *args, name"
|
||||
assert test13(1, 2, 3, name='hi') == ((1, 2, 3), 'hi'), "*args, name"
|
||||
|
Reference in New Issue
Block a user