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

Method test_broken_symlink

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

Source from the content-addressed store, hash-verified

1118 self.invokeBlack([".", "-c", "0"], exit_code=1)
1119
1120 def test_broken_symlink(self) -> None:
1121 with cache_dir() as workspace:
1122 symlink = workspace / "broken_link.py"
1123 try:
1124 symlink.symlink_to("nonexistent.py")
1125 except (OSError, NotImplementedError) as e:
1126 self.skipTest(f"Can't create symlinks: {e}")
1127 self.invokeBlack([str(workspace.resolve())])
1128
1129 def test_single_file_force_pyi(self) -> None:
1130 pyi_mode = replace(DEFAULT_MODE, is_pyi=True)

Callers

nothing calls this directly

Calls 1

cache_dirFunction · 0.85

Tested by

no test coverage detected