MCPcopy
hub / github.com/psf/black / test_write_cache_write_fail

Method test_write_cache_write_fail

tests/test_black.py:2462–2468  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2460 assert not cache.is_changed(clean)
2461
2462 def test_write_cache_write_fail(self) -> None:
2463 mode = DEFAULT_MODE
2464 with cache_dir():
2465 cache = black.Cache.read(mode)
2466 with patch.object(Path, "open") as mock:
2467 mock.side_effect = OSError
2468 cache.write([])
2469
2470 def test_read_cache_line_lengths(self) -> None:
2471 mode = DEFAULT_MODE

Callers

nothing calls this directly

Calls 3

cache_dirFunction · 0.85
readMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected