@@ -208,14 +208,14 @@ def test_decorators():
208
208
209
209
# set_opening_hours and ceil should have extra text at the beginning
210
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 (
212
- doctools .deindent_string (Cafe .set_opening_hours .__doc__ )
213
- )
211
+ assert (doctools .deindent_string (SpamCafe .set_opening_hours .__doc__
212
+ )).endswith (doctools .deindent_string (Cafe .set_opening_hours .__doc__ ))
214
213
# Dedented both strings to be sure of equivalence
215
214
assert SpamCafe .ceil .__doc__ .startswith (
216
215
"I don't know why the cafe has a ceil function, but we'd better document it properly." ,
217
216
)
218
- assert doctools .deindent_string (SpamCafe .ceil .__doc__ ).endswith (doctools .deindent_string (math .ceil .__doc__ ))
217
+ assert doctools .deindent_string (SpamCafe .ceil .__doc__
218
+ ).endswith (doctools .deindent_string (math .ceil .__doc__ ) + "\n " )
219
219
# Dedented both strings to be sure of equivalence
220
220
221
221
# Functions
@@ -225,9 +225,8 @@ def test_decorators():
225
225
assert partially_documented_function .__doc__ .startswith (
226
226
"This function works like ``documented_function`` except it returns the result telepathically." ,
227
227
)
228
- assert (doctools .deindent_string (partially_documented_function .__doc__ ) + "\n " ).endswith (
229
- doctools .deindent_string (documented_function .__doc__ )
230
- )
228
+ assert (doctools .deindent_string (partially_documented_function .__doc__
229
+ )).endswith (doctools .deindent_string (documented_function .__doc__ ))
231
230
# Dedented both strings to be sure of equivalence
232
231
assert DummyClass .function_in_class_with_same_args .__doc__ == documented_function .__doc__
233
232
assert DummyClass .function_in_class_with_same_args .__name__ == "function_in_class_with_same_args"
@@ -261,10 +260,10 @@ def funD():
261
260
assert funC .__doc__ == "World"
262
261
263
262
doctools .append_doctring_from_another (funB , funC )
264
- assert funB .__doc__ == "Hello\n World"
263
+ assert funB .__doc__ == "Hello\n \ n World\n "
265
264
266
265
doctools .append_doctring_from_another (funD , funB )
267
- assert funD .__doc__ == "Hello\n World"
266
+ assert funD .__doc__ == "Hello\n \ n World\n "
268
267
269
268
270
269
def test_still_callable ():
0 commit comments