summaryrefslogtreecommitdiff
path: root/tests/test_autodoc.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-04-24 00:23:55 +0900
committerGitHub <noreply@github.com>2019-04-24 00:23:55 +0900
commitb49ef12e6aed3481188da05955ee1782ebf70778 (patch)
tree3ea5daac16fb678120b6bab671a2ac4d83fe903c /tests/test_autodoc.py
parent80e50c1938ba3b17f85a8958b8baa7319c9fe66f (diff)
parent435ef05b99a73a8b1da1393219d3c660be1b9516 (diff)
downloadsphinx-git-b49ef12e6aed3481188da05955ee1782ebf70778.tar.gz
Merge pull request #6295 from tk0miya/refactor_py_domain4
autodoc: Support coroutine (refs: #4777)
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r--tests/test_autodoc.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py
index 49a02cfb4..5f616b791 100644
--- a/tests/test_autodoc.py
+++ b/tests/test_autodoc.py
@@ -1523,6 +1523,15 @@ def test_bound_method():
@pytest.mark.usefixtures('setup_test')
def test_coroutine():
+ actual = do_autodoc(app, 'function', 'target.functions.coroutinefunc')
+ assert list(actual) == [
+ '',
+ '.. py:function:: coroutinefunc()',
+ ' :module: target.functions',
+ ' :async:',
+ '',
+ ]
+
options = {"members": None}
actual = do_autodoc(app, 'class', 'target.coroutine.AsyncClass', options)
assert list(actual) == [
@@ -1533,6 +1542,7 @@ def test_coroutine():
' ',
' .. py:method:: AsyncClass.do_coroutine()',
' :module: target.coroutine',
+ ' :async:',
' ',
' A documented coroutine function',
' '