diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-03 13:44:17 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-07 17:50:10 +0900 |
commit | 961b4d1545eb5174617d8c3251006cc19f420088 (patch) | |
tree | 285572661764aae154d91ae4d71cc33435d61c9d /tests/test_autodoc.py | |
parent | 0e89979355c6c88adb960a7272c633d5afd34e67 (diff) | |
download | sphinx-git-961b4d1545eb5174617d8c3251006cc19f420088.tar.gz |
Close #2815: autodoc: Support singledispatch functions
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index b001de804..dcbdc6d3a 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -1563,3 +1563,22 @@ def test_autodoc_for_egged_code(app): ' :module: sample', '' ] + + +@pytest.mark.usefixtures('setup_test') +def test_singledispatch(): + options = {"members": None} + actual = do_autodoc(app, 'module', 'target.singledispatch', options) + assert list(actual) == [ + '', + '.. py:module:: target.singledispatch', + '', + '', + '.. py:function:: func(arg, kwarg=None)', + ' func(arg: int, kwarg=None)', + ' func(arg: str, kwarg=None)', + ' :module: target.singledispatch', + '', + ' A function for general use.', + ' ' + ] |