Skip to content

Commit 9c275a7

Browse files
committed
Fix test_tarfile on WASI
1 parent fcefa72 commit 9c275a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_tarfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4337,7 +4337,7 @@ def test_tar_filter(self):
43374337
# The 'tar' filter returns TarInfo objects with the same name/type.
43384338
# (It can also fail for particularly "evil" input, but we don't have
43394339
# that in the test archive.)
4340-
with tarfile.TarFile.open(tarname) as tar:
4340+
with tarfile.TarFile.open(tarname, encoding="iso8859-1") as tar:
43414341
for tarinfo in tar.getmembers():
43424342
try:
43434343
filtered = tarfile.tar_filter(tarinfo, '')
@@ -4349,7 +4349,7 @@ def test_tar_filter(self):
43494349
def test_data_filter(self):
43504350
# The 'data' filter either raises, or returns TarInfo with the same
43514351
# name/type.
4352-
with tarfile.TarFile.open(tarname) as tar:
4352+
with tarfile.TarFile.open(tarname, encoding="iso8859-1") as tar:
43534353
for tarinfo in tar.getmembers():
43544354
try:
43554355
filtered = tarfile.data_filter(tarinfo, '')

0 commit comments

Comments
 (0)