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

Method test_write_cache_read_cache

tests/test_black.py:2363–2371  ·  tests/test_black.py::TestCaching.test_write_cache_read_cache
(self)

Source from the content-addressed store, hash-verified

2361 assert black.Cache.read(mode).file_data == {}
2362
2363 def test_write_cache_read_cache(self) -> None:
2364 mode = DEFAULT_MODE
2365 with cache_dir() as workspace:
2366 src = (workspace / class="st">"test.py").resolve()
2367 src.touch()
2368 write_cache = black.Cache.read(mode)
2369 write_cache.write([src])
2370 read_cache = black.Cache.read(mode)
2371 assert not read_cache.is_changed(src)
2372
2373 @pytest.mark.incompatible_with_mypyc
2374 def test_filter_cached(self) -> None:

Callers

nothing calls this directly

Calls 4

cache_dirFunction · 0.85
readMethod · 0.80
writeMethod · 0.80
is_changedMethod · 0.80

Tested by

no test coverage detected