@@ -107,10 +107,10 @@ def test_rm_dir_datalad_ok(tmp_path, monkeypatch):
107107 (test_dir / 'file.txt' ).write_text ('test' )
108108
109109 # Mock datalad.remove to succeed
110- def mock_remove (path , ** kwargs ):
110+ def mock_remove (path = None , dataset = None , ** kwargs ):
111111 import shutil
112112
113- shutil .rmtree (path )
113+ shutil .rmtree (dataset or path )
114114
115115 monkeypatch .setattr (dlapi , 'remove' , mock_remove )
116116
@@ -127,7 +127,7 @@ def test_rm_dir_datalad_fail(tmp_path, monkeypatch):
127127 (test_dir / 'file.txt' ).write_text ('test' )
128128
129129 # Mock datalad.remove to raise an exception
130- def mock_remove (path , ** kwargs ):
130+ def mock_remove (path = None , dataset = None , ** kwargs ):
131131 raise Exception ('datalad remove failed' )
132132
133133 monkeypatch .setattr (dlapi , 'remove' , mock_remove )
@@ -145,7 +145,7 @@ def test_rm_dir_datalad_partial(tmp_path, monkeypatch):
145145 (test_dir / 'file.txt' ).write_text ('test' )
146146
147147 # Mock datalad.remove to succeed but not remove everything
148- def mock_remove (path , ** kwargs ):
148+ def mock_remove (path = None , dataset = None , ** kwargs ):
149149 # Remove some files but leave the directory
150150 (test_dir / 'file.txt' ).unlink ()
151151 # Don't actually remove the directory
0 commit comments