Commit ef903ecd authored by Zsolt Dollenstein's avatar Zsolt Dollenstein Committed by Łukasz Langa
Browse files

Skip symlink test if can't create one (#287)

parent a80e037a
Loading
Loading
Loading
Loading
+3 −0
Changes for tests/test_black.py: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -731,7 +731,10 @@ def test_no_files(self) -> None:
    def test_broken_symlink(self) -> None:
        with cache_dir() as workspace:
            symlink = workspace / "broken_link.py"
            try:
                symlink.symlink_to("nonexistent.py")
            except OSError as e:
                self.skipTest(f"Can't create symlinks: {e}")
            result = CliRunner().invoke(black.main, [str(workspace.resolve())])
            self.assertEqual(result.exit_code, 0)