Skip to content

gh-133677 Skip test in test_zipfile if not UTF-8 #133715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/test/test_zipfile/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import importlib.util
import io
import itertools
import locale
import os
import posixpath
import stat
Expand Down Expand Up @@ -31,7 +32,6 @@
)
from test.support.import_helper import ensure_lazy_imports


TESTFN2 = TESTFN + "2"
TESTFNDIR = TESTFN + "d"
FIXEDTEST_SIZE = 1000
Expand Down Expand Up @@ -3631,6 +3631,7 @@ def test_cli_with_metadata_encoding(self):
for name in self.file_names:
self.assertIn(name, listing)

@unittest.skipIf(locale.getpreferredencoding().lower() != 'utf-8', 'test requires utf-8')
def test_cli_with_metadata_encoding_extract(self):
os.mkdir(TESTFN2)
self.addCleanup(rmtree, TESTFN2)
Expand Down
Loading