summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-10-28 02:13:49 +0900
committerGitHub <noreply@github.com>2020-10-28 02:13:49 +0900
commit871f43f77837d7e668fcaac8d22cdeaff3d7b8e0 (patch)
tree594c76c23df106099a8738373e2a0a195913d23b /tests
parentcc97a076407d20a495f95c1b2dfa996d629d5452 (diff)
parent2c2335bbb8af99fa132e1573bbf45dc91584d5a2 (diff)
downloadsphinx-git-871f43f77837d7e668fcaac8d22cdeaff3d7b8e0.tar.gz
Merge branch '3.x' into 7785_autodoc_typehints_none_for_overloads
Diffstat (limited to 'tests')
-rw-r--r--tests/roots/test-ext-autodoc/target/slots.py4
-rw-r--r--tests/test_ext_autodoc.py8
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autodoc/target/slots.py b/tests/roots/test-ext-autodoc/target/slots.py
index 44e750320..17e469cac 100644
--- a/tests/roots/test-ext-autodoc/target/slots.py
+++ b/tests/roots/test-ext-autodoc/target/slots.py
@@ -2,6 +2,10 @@ class Foo:
__slots__ = ['attr']
+class FooSingleString:
+ __slots__ = 'attr'
+
+
class Bar:
__slots__ = {'attr1': 'docstring of attr1',
'attr2': 'docstring of attr2',
diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py
index 9cb54de5b..c0676f23f 100644
--- a/tests/test_ext_autodoc.py
+++ b/tests/test_ext_autodoc.py
@@ -1205,6 +1205,14 @@ def test_slots(app):
' .. py:attribute:: Foo.attr',
' :module: target.slots',
'',
+ '',
+ '.. py:class:: FooSingleString()',
+ ' :module: target.slots',
+ '',
+ '',
+ ' .. py:attribute:: FooSingleString.attr',
+ ' :module: target.slots',
+ '',
]