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

Method test_no_cache_when_stdin

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

Source from the content-addressed store, hash-verified

2299 mgr.assert_called()
2300
2301 def test_no_cache_when_stdin(self) -> None:
2302 mode = DEFAULT_MODE
2303 with cache_dir():
2304 result = BlackRunner().invoke(
2305 black.main, ["-"], input=BytesIO(b"print('hello')")
2306 )
2307 assert not result.exit_code
2308 cache_file = get_cache_file(mode)
2309 assert not cache_file.exists()
2310
2311 def test_no_cache_flag_prevents_writes(self) -> None:
2312 """--no-cache should neither read nor write the cache"""

Callers

nothing calls this directly

Calls 3

get_cache_fileFunction · 0.90
cache_dirFunction · 0.85
BlackRunnerClass · 0.85

Tested by

no test coverage detected