@@ -899,8 +899,17 @@ def test_duplicate_signature():
899899 Current time.
900900 y : ndarray
901901 Current variable values.
902- x : float
903- Some parameter
902+
903+ * hello
904+ * world
905+ an_attribute : float
906+ The docstring is printed instead
907+ no_docstring : str
908+ But a description
909+ no_docstring2 : str
910+ multiline_sentence
911+ midword_period
912+ no_period
904913
905914 Methods
906915 -------
@@ -936,8 +945,17 @@ def test_class_members_doc():
936945 Current time.
937946 y : ndarray
938947 Current variable values.
939- x : float
940- Some parameter
948+
949+ * hello
950+ * world
951+ an_attribute : float
952+ The docstring is printed instead
953+ no_docstring : str
954+ But a description
955+ no_docstring2 : str
956+ multiline_sentence
957+ midword_period
958+ no_period
941959
942960 Methods
943961 -------
@@ -954,10 +972,38 @@ def test_class_members_doc():
954972def test_class_members_doc_sphinx ():
955973 class Foo :
956974 @property
957- def x (self ):
975+ def an_attribute (self ):
958976 """Test attribute"""
959977 return None
960978
979+ @property
980+ def no_docstring (self ):
981+ return None
982+
983+ @property
984+ def no_docstring2 (self ):
985+ return None
986+
987+ @property
988+ def multiline_sentence (self ):
989+ """This is a
990+ sentence. It spans multiple lines."""
991+ return None
992+
993+ @property
994+ def midword_period (self ):
995+ """The sentence for numpy.org."""
996+ return None
997+
998+ @property
999+ def no_period (self ):
1000+ """This does not have a period
1001+ so we truncate its summary to the first linebreak
1002+
1003+ Apparently.
1004+ """
1005+ return None
1006+
9611007 doc = SphinxClassDoc (Foo , class_doc_txt )
9621008 non_blank_line_by_line_compare (str (doc ),
9631009 """
@@ -983,15 +1029,30 @@ def x(self):
9831029 Current time.
9841030 **y** : ndarray
9851031 Current variable values.
986- :obj:`x <x>` : float
1032+
1033+ * hello
1034+ * world
1035+ :obj:`an_attribute <an_attribute>` : float
9871036 Test attribute
1037+ **no_docstring** : str
1038+ But a description
1039+ **no_docstring2** : str
1040+ :obj:`multiline_sentence <multiline_sentence>`
1041+ This is a sentence.
1042+ :obj:`midword_period <midword_period>`
1043+ The sentence for numpy.org.
1044+ :obj:`no_period <no_period>`
1045+ This does not have a period
9881046
9891047 ..
9901048 HACK to make autogen generate docs:
9911049 .. autosummary::
9921050 :toctree:
9931051
994- x
1052+ an_attribute
1053+ multiline_sentence
1054+ midword_period
1055+ no_period
9951056
9961057 .. rubric:: Methods
9971058
0 commit comments