summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-03 13:21:46 +0900
committerGitHub <noreply@github.com>2021-04-03 13:21:46 +0900
commitc6c970e3222d69ccdbf599fbd46e69977be8b1bd (patch)
tree27768dc221caff89dabfb8f83eedb49ab322d370
parent6a873cae0ba40448c5fba59472b60c761d4a5b0d (diff)
parentec4d410c48805e609e02a7db465b7e22ab193047 (diff)
downloadsphinx-git-c6c970e3222d69ccdbf599fbd46e69977be8b1bd.tar.gz
Merge pull request #9048 from tk0miya/fix_enum_sig
Fix testcase: the signature of Enum class has been changed since HEAD of 3.10
-rw-r--r--tests/test_ext_autodoc.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py
index 42aa3e808..1dc1bfe76 100644
--- a/tests/test_ext_autodoc.py
+++ b/tests/test_ext_autodoc.py
@@ -1373,9 +1373,16 @@ def test_slots(app):
def test_enum_class(app):
options = {"members": None}
actual = do_autodoc(app, 'class', 'target.enums.EnumCls', options)
+
+ if sys.version_info < (3, 10):
+ sig = '(value)'
+ else:
+ sig = ('(value, names=None, *, module=None, qualname=None, type=None, start=1, '
+ 'boundary=None)')
+
assert list(actual) == [
'',
- '.. py:class:: EnumCls(value)',
+ '.. py:class:: EnumCls%s' % sig,
' :module: target.enums',
'',
' this is enum class',