bpo-43288: Fix bug in test_importlib test. (GH-24612)

This commit is contained in:
Neil Schemenauer 2021-02-21 13:48:18 -08:00 committed by GitHub
parent d5fc998737
commit 50288aa8c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import pathlib
import tempfile
import textwrap
import contextlib
import unittest
from test.support.os_helper import FS_NONASCII
from typing import Dict, Union
@ -219,6 +220,9 @@ class LocalPackage:
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

View File

@ -0,0 +1,2 @@
Fix test_importlib to correctly skip Unicode file tests if the fileystem
does not support them.