From b4d4d4e808b07037729b17a741a73ade07878581 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 22 Nov 2020 03:06:03 +0900 Subject: [PATCH] refactor: Rename example class --- tests/roots/test-ext-autodoc/target/slots.py | 8 ++++---- tests/test_ext_autodoc.py | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/roots/test-ext-autodoc/target/slots.py b/tests/roots/test-ext-autodoc/target/slots.py index 17e469cac..144f97c95 100644 --- a/tests/roots/test-ext-autodoc/target/slots.py +++ b/tests/roots/test-ext-autodoc/target/slots.py @@ -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' diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py index d8e1f730e..66dc21f3f 100644 --- a/tests/test_ext_autodoc.py +++ b/tests/test_ext_autodoc.py @@ -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', - '', ]