(path: Path)
| 2385 | orig_func = black.Cache.get_file_data |
| 2386 | |
| 2387 | def wrapped_func(path: Path) -> FileData: |
| 2388 | if path == cached: |
| 2389 | return orig_func(path) |
| 2390 | if path == cached_but_changed: |
| 2391 | return FileData(0.0, 0, "") |
| 2392 | raise AssertionError |
| 2393 | |
| 2394 | with patch.object(black.Cache, "get_file_data", side_effect=wrapped_func): |
| 2395 | cache.write([cached, cached_but_changed]) |