Skip to content

Commit

Permalink
Update update-zips so it passes on Windows too
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 19, 2021
1 parent d7ff6e7 commit 3197fe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions importlib_resources/tests/update-zips.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def main():
>>> monkeypatch.setattr(zipfile, 'ZipFile', mock.MagicMock())
>>> print(); main() # print workaround for bpo-32509
<BLANKLINE>
.../data01/... -> ziptestdata/...
...data01... -> ziptestdata/...
...
.../data02/... -> ziptestdata/...
...data02... -> ziptestdata/...
...
"""
suffixes = '01', '02'
Expand All @@ -35,7 +35,7 @@ def generate(suffix):
zfpath = root / f'zipdata{suffix}/ziptestdata.zip'
with zipfile.ZipFile(zfpath, 'w') as zf:
for src, rel in walk(root / f'data{suffix}'):
dst = 'ziptestdata' / rel
dst = 'ziptestdata' / pathlib.PurePosixPath(rel.as_posix())
print(src, '->', dst)
zf.write(src, dst)

Expand Down

0 comments on commit 3197fe0

Please sign in to comment.