Skip to content

Commit

Permalink
Explicitly delete junction test dir
Browse files Browse the repository at this point in the history
Otherwise the tempdir cleanup will fail in rmdir for python <3.8
  • Loading branch information
yoerg committed Mar 4, 2022
1 parent 6114192 commit 6cb749f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_black.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,9 @@ def test_normalize_path_ignore_windows_junctions_outside_of_root(self) -> None:
normalized_path = black.normalize_path_maybe_ignore(
junction_dir, root, report
)
# Manually delete for Python < 3.8
os.system(f"rmdir {junction_dir}")

self.assertEqual(normalized_path, None)

def test_newline_comment_interaction(self) -> None:
Expand Down

0 comments on commit 6cb749f

Please sign in to comment.