summaryrefslogtreecommitdiff
path: root/tests/test_util_inspect.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-02-22 00:28:35 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-02-22 00:49:45 +0900
commit2fec37219fc8d99f96026308116ef859c67d7588 (patch)
treea9359eccc69155a47a6198cc5ebb7dedc6df29a3 /tests/test_util_inspect.py
parent130a0a7f3877e55fca5ead70edd880fc2f23ff46 (diff)
downloadsphinx-git-2fec37219fc8d99f96026308116ef859c67d7588.tar.gz
Fix #7189: autodoc: classmethod coroutines are not detected
Diffstat (limited to 'tests/test_util_inspect.py')
-rw-r--r--tests/test_util_inspect.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_util_inspect.py b/tests/test_util_inspect.py
index c6b2c9149..a8019a9c3 100644
--- a/tests/test_util_inspect.py
+++ b/tests/test_util_inspect.py
@@ -420,6 +420,16 @@ def test_dict_customtype():
@pytest.mark.sphinx(testroot='ext-autodoc')
+def test_isclassmethod(app):
+ from target.methods import Base, Inherited
+
+ assert inspect.isclassmethod(Base.classmeth) is True
+ assert inspect.isclassmethod(Base.meth) is False
+ assert inspect.isclassmethod(Inherited.classmeth) is True
+ assert inspect.isclassmethod(Inherited.meth) is False
+
+
+@pytest.mark.sphinx(testroot='ext-autodoc')
def test_isstaticmethod(app):
from target.methods import Base, Inherited