Merge pull request #8469 from tk0miya/refactor_test_ext_autodoc_slots

refactor: Rename example class
This commit is contained in:
Takeshi KOMIYA
2020-11-22 11:42:13 +09:00
committed by GitHub
2 changed files with 12 additions and 12 deletions

View File

@@ -2,10 +2,6 @@ class Foo:
__slots__ = ['attr']
class FooSingleString:
__slots__ = 'attr'
class Bar:
__slots__ = {'attr1': 'docstring of attr1',
'attr2': 'docstring of attr2',
@@ -13,3 +9,7 @@ class Bar:
def __init__(self):
self.attr2 = None #: docstring of instance attr2
class Baz:
__slots__ = 'attr'

View File

@@ -1194,6 +1194,14 @@ def test_slots(app):
' :module: target.slots',
'',
'',
'.. py:class:: Baz()',
' :module: target.slots',
'',
'',
' .. py:attribute:: Baz.attr',
' :module: target.slots',
'',
'',
'.. py:class:: Foo()',
' :module: target.slots',
'',
@@ -1201,14 +1209,6 @@ def test_slots(app):
' .. py:attribute:: Foo.attr',
' :module: target.slots',
'',
'',
'.. py:class:: FooSingleString()',
' :module: target.slots',
'',
'',
' .. py:attribute:: FooSingleString.attr',
' :module: target.slots',
'',
]