Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Skip symlink test if can't create one (pytest-dev#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsol authored and ambv committed Jun 1, 2018
1 parent a80e037 commit ef903ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_black.py
Expand Up @@ -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"
symlink.symlink_to("nonexistent.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)

Expand Down

0 comments on commit ef903ec

Please sign in to comment.