@@ -124,8 +124,7 @@ def opening_hours(self):
124124
125125 @doctools .append_docstring_from (Cafe .set_opening_hours )
126126 def set_opening_hours (self , opens_at , closes_at ):
127- """
128- I will not buy this record, it is scratched.
127+ """I will not buy this record, it is scratched.
129128 """
130129
131130 self ._opens_at = opens_at
@@ -208,13 +207,13 @@ def test_decorators():
208207 assert SpamCafe .opening_hours .__doc__ == Cafe .opening_hours .__doc__
209208
210209 # set_opening_hours and ceil should have extra text at the beginning
211- assert SpamCafe .set_opening_hours .__doc__ .startswith ("\n I will not buy this record, it is scratched." )
212- assert doctools .deindent_string (SpamCafe .set_opening_hours .__doc__ , ).endswith (
210+ assert SpamCafe .set_opening_hours .__doc__ .startswith ("I will not buy this record, it is scratched." )
211+ assert ( doctools .deindent_string (SpamCafe .set_opening_hours .__doc__ ) + " \n " ).endswith (
213212 doctools .deindent_string (Cafe .set_opening_hours .__doc__ )
214213 )
215214 # Dedented both strings to be sure of equivalence
216215 assert SpamCafe .ceil .__doc__ .startswith (
217- "\n I don't know why the cafe has a ceil function, but we'd better document it properly." ,
216+ "I don't know why the cafe has a ceil function, but we'd better document it properly." ,
218217 )
219218 assert doctools .deindent_string (SpamCafe .ceil .__doc__ ).endswith (doctools .deindent_string (math .ceil .__doc__ ))
220219 # Dedented both strings to be sure of equivalence
@@ -224,9 +223,9 @@ def test_decorators():
224223 assert undocumented_function .__name__ == "undocumented_function"
225224 assert undocumented_function .__annotations__ == {'a' : float , 'b' : float , 'c' : float , 'd' : int , "return" : float }
226225 assert partially_documented_function .__doc__ .startswith (
227- "\n This function works like ``documented_function`` except it returns the result telepathically." ,
226+ "This function works like ``documented_function`` except it returns the result telepathically." ,
228227 )
229- assert doctools .deindent_string (partially_documented_function .__doc__ , ).endswith (
228+ assert ( doctools .deindent_string (partially_documented_function .__doc__ ) + " \n " ).endswith (
230229 doctools .deindent_string (documented_function .__doc__ )
231230 )
232231 # Dedented both strings to be sure of equivalence
0 commit comments