Skip to content

Commit

Permalink
Test fix for PyPy failure on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cpburnz committed Sep 8, 2023
1 parent 59aa2be commit e549c72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_2_2_links(self):
('bx', 'b'),
('Dir/cx', 'Dir/c'),
('Dir/dx', 'Dir/d'),
('DirX', 'Dir'),
('DirX', 'Dir', True),
])
results = set(iter_tree_files(self.temp_dir))
self.assertEqual(results, set(map(ospath, [
Expand Down
5 changes: 3 additions & 2 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ def make_links(temp_dir: pathlib.Path, links: Iterable[Tuple[str, str]]) -> None
the destination link path (:class:`str`) and source node path
(:class:`str`).
"""
for link, node in links:
for link, node, *opt in links:
src = temp_dir / ospath(node)
dest = temp_dir / ospath(link)
os.symlink(src, dest)
is_dir = opt[0] if opt else False
os.symlink(src, dest, target_is_directory=is_dir)


def mkfile(file: pathlib.Path) -> None:
Expand Down

0 comments on commit e549c72

Please sign in to comment.