File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,12 @@ def __len__(self):
287287 By default, all transforms are of length one.
288288 This must be overriden by transforms arrays and chains.
289289
290+ Example
291+ -------
292+ >>> T1 = TransformBase()
293+ >>> len(T1)
294+ 1
295+
290296 """
291297 return 1
292298
Original file line number Diff line number Diff line change @@ -198,3 +198,18 @@ def test_SurfaceMesh(testdata_path):
198198
199199 with pytest .raises (TypeError ):
200200 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