diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-28 02:13:49 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-28 02:13:49 +0900 |
| commit | 871f43f77837d7e668fcaac8d22cdeaff3d7b8e0 (patch) | |
| tree | 594c76c23df106099a8738373e2a0a195913d23b /tests | |
| parent | cc97a076407d20a495f95c1b2dfa996d629d5452 (diff) | |
| parent | 2c2335bbb8af99fa132e1573bbf45dc91584d5a2 (diff) | |
| download | sphinx-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.py | 4 | ||||
| -rw-r--r-- | tests/test_ext_autodoc.py | 8 |
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', + '', ] |
