@@ -189,50 +189,29 @@ def test_docstring_addition():
189
189
@_preprocess_data ()
190
190
def funcy (ax , * args , ** kwargs ):
191
191
"""Funcy does nothing"""
192
- pass
193
192
194
- assert re .search (r".*All positional and all keyword arguments\." ,
195
- funcy .__doc__ )
196
- assert not re .search (r".*All positional arguments\." ,
197
- funcy .__doc__ )
198
- assert not re .search (r".*All arguments with the following names: .*" ,
199
- funcy .__doc__ )
193
+ assert re .search (r"every other argument" , funcy .__doc__ )
194
+ assert not re .search (r"the following arguments" , funcy .__doc__ )
200
195
201
196
@_preprocess_data (replace_names = [])
202
197
def funcy (ax , x , y , z , bar = None ):
203
198
"""Funcy does nothing"""
204
- pass
205
199
206
- assert not re .search (r".*All positional arguments\." ,
207
- funcy .__doc__ )
208
- assert not re .search (r".*All positional and all keyword arguments\." ,
209
- funcy .__doc__ )
210
- assert not re .search (r".*All arguments with the following names: .*" ,
211
- funcy .__doc__ )
200
+ assert not re .search (r"every other argument" , funcy .__doc__ )
201
+ assert not re .search (r"the following arguments" , funcy .__doc__ )
212
202
213
203
@_preprocess_data (replace_names = ["bar" ])
214
204
def funcy (ax , x , y , z , bar = None ):
215
205
"""Funcy does nothing"""
216
- pass
217
206
218
- assert not re .search (r".*All positional arguments\." ,
219
- funcy .__doc__ )
220
- assert re .search (r".*All arguments with the following names: 'bar'\." ,
221
- funcy .__doc__ )
222
- assert not re .search (r".*All positional and all keyword arguments\." ,
207
+ assert not re .search (r"every other argument" , funcy .__doc__ )
208
+ assert not re .search (r"the following arguments .*: \*bar\*\." ,
223
209
funcy .__doc__ )
224
210
225
- @_preprocess_data (replace_names = ["x" , "bar " ])
226
- def funcy (ax , x , y , z , bar = None ):
211
+ @_preprocess_data (replace_names = ["x" , "t " ])
212
+ def funcy (ax , x , y , z , t = None ):
227
213
"""Funcy does nothing"""
228
- pass
229
214
230
- # lists can print in any order, so test for both x, bar and bar, x.
231
- assert re .search (r".*All arguments with the following names: '.*', '.*'\." ,
232
- funcy .__doc__ )
233
- assert re .search (r".*'x'.*" , funcy .__doc__ )
234
- assert re .search (r".*'bar'.*" , funcy .__doc__ )
235
- assert not re .search (r".*All positional and all keyword arguments\." ,
236
- funcy .__doc__ )
237
- assert not re .search (r".*All positional arguments\." ,
215
+ assert not re .search (r"every other argument" , funcy .__doc__ )
216
+ assert not re .search (r"the following arguments .*: \*x\*, \*t\*\." ,
238
217
funcy .__doc__ )
0 commit comments