@@ -124,8 +124,7 @@ def opening_hours(self):
124
124
125
125
@doctools .append_docstring_from (Cafe .set_opening_hours )
126
126
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.
129
128
"""
130
129
131
130
self ._opens_at = opens_at
@@ -208,13 +207,13 @@ def test_decorators():
208
207
assert SpamCafe .opening_hours .__doc__ == Cafe .opening_hours .__doc__
209
208
210
209
# 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 (
213
212
doctools .deindent_string (Cafe .set_opening_hours .__doc__ )
214
213
)
215
214
# Dedented both strings to be sure of equivalence
216
215
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." ,
218
217
)
219
218
assert doctools .deindent_string (SpamCafe .ceil .__doc__ ).endswith (doctools .deindent_string (math .ceil .__doc__ ))
220
219
# Dedented both strings to be sure of equivalence
@@ -224,9 +223,9 @@ def test_decorators():
224
223
assert undocumented_function .__name__ == "undocumented_function"
225
224
assert undocumented_function .__annotations__ == {'a' : float , 'b' : float , 'c' : float , 'd' : int , "return" : float }
226
225
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." ,
228
227
)
229
- assert doctools .deindent_string (partially_documented_function .__doc__ , ).endswith (
228
+ assert ( doctools .deindent_string (partially_documented_function .__doc__ ) + " \n " ).endswith (
230
229
doctools .deindent_string (documented_function .__doc__ )
231
230
)
232
231
# Dedented both strings to be sure of equivalence
0 commit comments