Skip to content

Commit b5d4419

Browse files
authored
Merge pull request #323 from nipreps/fix/flaky-test
FIX: Refactor registration patching with monkeypatch
2 parents d6d0f1a + 32e9e63 commit b5d4419

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test_estimator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ def fake_set_transform(self, i, xform):
184184
class DummyXForm:
185185
matrix = np.eye(4)
186186

187-
nifreeze.estimator._run_registration = lambda *a, **k: DummyXForm()
187+
monkeypatch.setattr(
188+
nifreeze.estimator,
189+
"_run_registration",
190+
lambda *a, **k: DummyXForm(),
191+
)
188192

189193
model = DummyModel(dataset=dataset)
190194
estimator = Estimator(model, strategy=strategy)

0 commit comments

Comments
 (0)