diff --git a/tests/test_calibrated_texture_extra.py b/tests/test_calibrated_texture_extra.py index d76eb1747..1a65d768b 100644 --- a/tests/test_calibrated_texture_extra.py +++ b/tests/test_calibrated_texture_extra.py @@ -2233,7 +2233,7 @@ def test_export_file_replacement_failure_cleans_temporary_file(self): out = self.root / "replace_fail.dds" with _fake_native_context(), \ - mock.patch("replace_retry.replace", side_effect=OSError("simulated I/O write failure")): + mock.patch.object(ct.replace_retry, "replace", side_effect=OSError("simulated I/O write failure")): with self.assertRaisesRegex(OSError, "simulated I/O write failure"): ct.export_file(pool, 0, out, None, True, self.profile)