mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
gh-97930: Merge with importlib_resources 5.9 (GH-97929)
* Merge with importlib_resources 5.9 * Update changelog
This commit is contained in:
parent
5c9302d03a
commit
cea910ebf1
7 changed files with 102 additions and 29 deletions
|
|
@ -111,6 +111,14 @@ def test_submodule_contents_by_name(self):
|
|||
{'__init__.py', 'binary.file'},
|
||||
)
|
||||
|
||||
def test_as_file_directory(self):
|
||||
with resources.as_file(resources.files('ziptestdata')) as data:
|
||||
assert data.name == 'ziptestdata'
|
||||
assert data.is_dir()
|
||||
assert data.joinpath('subdirectory').is_dir()
|
||||
assert len(list(data.iterdir()))
|
||||
assert not data.parent.exists()
|
||||
|
||||
|
||||
class ResourceFromZipsTest02(util.ZipSetupBase, unittest.TestCase):
|
||||
ZIP_MODULE = zipdata02 # type: ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue