diff --git a/Lib/test/test_importlib/fixtures.py b/Lib/test/test_importlib/fixtures.py index 2e55d14b9aab97..524ac6c2a9c949 100644 --- a/Lib/test/test_importlib/fixtures.py +++ b/Lib/test/test_importlib/fixtures.py @@ -5,6 +5,7 @@ import tempfile import textwrap import contextlib +import unittest @contextlib.contextmanager @@ -175,6 +176,9 @@ def setUp(self): self.fixtures.enter_context(tempdir_as_cwd()) build_files(self.files) + def skip(self, reason): + raise unittest.SkipTest(reason) + def build_files(file_defs, prefix=pathlib.Path()): """Build a set of files/directories, as described by the diff --git a/Misc/NEWS.d/next/Tests/2021-02-21-11-11-53.bpo-43288.LfTvL-.rst b/Misc/NEWS.d/next/Tests/2021-02-21-11-11-53.bpo-43288.LfTvL-.rst new file mode 100644 index 00000000000000..8463540ae8a14c --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-02-21-11-11-53.bpo-43288.LfTvL-.rst @@ -0,0 +1,2 @@ +Fix test_importlib to correctly skip Unicode file tests if the fileystem +does not support them.