You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Update tests related to branch
This commit is contained in:
BIN
test/bytecode_3.0_run/04_def_annotate.pyc
Normal file
BIN
test/bytecode_3.0_run/04_def_annotate.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.1_run/04_def_annotate.pyc
Normal file
BIN
test/bytecode_3.1_run/04_def_annotate.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.2_run/04_def_annotate.pyc
Normal file
BIN
test/bytecode_3.2_run/04_def_annotate.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -47,6 +47,12 @@ def test14(*args, name: int=1, qname):
|
||||
def test15(*args, name='S', fname, qname=4):
|
||||
return args, name, fname, qname
|
||||
|
||||
# From 3.4 /asyncio/streams.py open_connection
|
||||
_DEFAULT_LIMIT = 5
|
||||
def test16(host=None, port=None, *,
|
||||
loop=None, limit=_DEFAULT_LIMIT, **kwds):
|
||||
return host, port, loop, limit, kwds
|
||||
|
||||
# Python 3.1 _pyio.py uses the -> "IOBase" annotation
|
||||
def o(f, mode = "r", buffering = None) -> "IOBase":
|
||||
return (f, mode, buffering)
|
||||
@@ -122,6 +128,10 @@ def ann2(args_1, b: int = 5, **kwargs: float) -> float:
|
||||
assert ann2.__annotations__['return'] == float
|
||||
assert b == 5
|
||||
|
||||
class TestSignatureObject():
|
||||
def test_signature_on_wkwonly(self):
|
||||
def test(x:int=55, *args: (int, str), c='test', a:float, kwargs:str="S", **b: int) -> int:
|
||||
pass
|
||||
|
||||
assert test1(1, 5) == (1, 5, 4, {})
|
||||
assert test1(1, 5, 6, foo='bar') == (1, 5, 6, {'foo': 'bar'})
|
||||
@@ -139,3 +149,4 @@ ann2(1)
|
||||
|
||||
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"
|
||||
assert test16('localhost', loop=2, limit=3, a='b') == ('localhost', None, 2, 3, {'a': 'b'})
|
||||
|
Reference in New Issue
Block a user