diff options
author | Takayuki SHIMIZUKAWA <shimizukawa@gmail.com> | 2016-10-19 00:54:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 00:54:38 +0900 |
commit | 340c6fb9f435329784f0961d434cfa51dd501e8d (patch) | |
tree | 53261a6a227504673ceb8cc5ff11919c595e9437 /tests/test_autodoc.py | |
parent | 6438cf54dbc0316ee7d4191eb9719971c62648de (diff) | |
parent | 0beabaf4cfbbe6963fd7f5d5d9fe043d2e3163a4 (diff) | |
download | sphinx-git-340c6fb9f435329784f0961d434cfa51dd501e8d.tar.gz |
Merge pull request #2432 from agronholm/kwonlyargs
#2432 Fix unwanted * between varargs and keyword only args
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index fca3c2b9e..024b71002 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -1052,14 +1052,17 @@ def test_type_hints(): # Keyword-only arguments verify_arg_spec(f5, '(x: int, *, y: str, z: str) -> None') + # Keyword-only arguments with varargs + verify_arg_spec(f6, '(x: int, *args, y: str, z: str) -> None') + # Space around '=' for defaults - verify_arg_spec(f6, '(x: int = None, y: dict = {}) -> None') + verify_arg_spec(f7, '(x: int = None, y: dict = {}) -> None') # Callable types - verify_arg_spec(f7, '(x: typing.Callable[[int, str], int]) -> None') + verify_arg_spec(f8, '(x: typing.Callable[[int, str], int]) -> None') # Tuple types - verify_arg_spec(f8, '(x: typing.Tuple[int, str],' + verify_arg_spec(f9, '(x: typing.Tuple[int, str],' ' y: typing.Tuple[int, ...]) -> None') # Instance annotations |