Skip to content

Commit 3197fe0

Browse files
committed
Update update-zips so it passes on Windows too
1 parent d7ff6e7 commit 3197fe0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

importlib_resources/tests/update-zips.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def main():
2121
>>> monkeypatch.setattr(zipfile, 'ZipFile', mock.MagicMock())
2222
>>> print(); main() # print workaround for bpo-32509
2323
<BLANKLINE>
24-
.../data01/... -> ziptestdata/...
24+
...data01... -> ziptestdata/...
2525
...
26-
.../data02/... -> ziptestdata/...
26+
...data02... -> ziptestdata/...
2727
...
2828
"""
2929
suffixes = '01', '02'
@@ -35,7 +35,7 @@ def generate(suffix):
3535
zfpath = root / f'zipdata{suffix}/ziptestdata.zip'
3636
with zipfile.ZipFile(zfpath, 'w') as zf:
3737
for src, rel in walk(root / f'data{suffix}'):
38-
dst = 'ziptestdata' / rel
38+
dst = 'ziptestdata' / pathlib.PurePosixPath(rel.as_posix())
3939
print(src, '->', dst)
4040
zf.write(src, dst)
4141

0 commit comments

Comments
 (0)