File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,12 @@ def __len__(self):
287
287
By default, all transforms are of length one.
288
288
This must be overriden by transforms arrays and chains.
289
289
290
+ Example
291
+ -------
292
+ >>> T1 = TransformBase()
293
+ >>> len(T1)
294
+ 1
295
+
290
296
"""
291
297
return 1
292
298
Original file line number Diff line number Diff line change @@ -198,3 +198,18 @@ def test_SurfaceMesh(testdata_path):
198
198
199
199
with pytest .raises (TypeError ):
200
200
SurfaceMesh (nb .load (shape_path ))
201
+
202
+
203
+ def test_apply_deprecation (monkeypatch ):
204
+ """Make sure a deprecation warning is issued."""
205
+ from nitransforms import resampling
206
+
207
+ def _retval (* args , ** kwargs ):
208
+ return 1
209
+
210
+ monkeypatch .setattr (resampling , "apply" , _retval )
211
+
212
+ with pytest .deprecated_call ():
213
+ retval = TransformBase ().apply ()
214
+
215
+ assert retval == 1
You can’t perform that action at this time.
0 commit comments