(self)
| 2468 | cache.write([]) |
| 2469 | |
| 2470 | def test_read_cache_line_lengths(self) -> None: |
| 2471 | mode = DEFAULT_MODE |
| 2472 | short_mode = replace(DEFAULT_MODE, line_length=1) |
| 2473 | with cache_dir() as workspace: |
| 2474 | path = (workspace / "file.py").resolve() |
| 2475 | path.touch() |
| 2476 | cache = black.Cache.read(mode) |
| 2477 | cache.write([path]) |
| 2478 | one = black.Cache.read(mode) |
| 2479 | assert not one.is_changed(path) |
| 2480 | two = black.Cache.read(short_mode) |
| 2481 | assert two.is_changed(path) |
| 2482 | |
| 2483 | def test_cache_key(self) -> None: |
| 2484 | # Test that all members of the mode enum affect the cache key. |
nothing calls this directly
no test coverage detected