@@ -189,50 +189,29 @@ def test_docstring_addition():
189189 @_preprocess_data ()
190190 def funcy (ax , * args , ** kwargs ):
191191 """Funcy does nothing"""
192- pass
193192
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__ )
200195
201196 @_preprocess_data (replace_names = [])
202197 def funcy (ax , x , y , z , bar = None ):
203198 """Funcy does nothing"""
204- pass
205199
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__ )
212202
213203 @_preprocess_data (replace_names = ["bar" ])
214204 def funcy (ax , x , y , z , bar = None ):
215205 """Funcy does nothing"""
216- pass
217206
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\*\." ,
223209 funcy .__doc__ )
224210
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 ):
227213 """Funcy does nothing"""
228- pass
229214
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\*\." ,
238217 funcy .__doc__ )
0 commit comments