diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2023-02-25 16:15:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 16:15:48 (GMT) |
commit | a35fd38b57d3eb05074ca36f3d57e1993c44ddc9 (patch) | |
tree | 417ca5e0de3632fa79d7248b23df8597ec5a0b33 /Lib/zipfile | |
parent | 207e1c5cae11108213dff5ff07443ee4cfa0d2ea (diff) | |
download | cpython-a35fd38b57d3eb05074ca36f3d57e1993c44ddc9.zip cpython-a35fd38b57d3eb05074ca36f3d57e1993c44ddc9.tar.gz cpython-a35fd38b57d3eb05074ca36f3d57e1993c44ddc9.tar.bz2 |
gh-102209: Sync with zipp 3.15 moving complexity tests into dedicated module (#102232)
Sync with jaraco/zipp@757a4e1a.
Diffstat (limited to 'Lib/zipfile')
-rw-r--r-- | Lib/zipfile/_path.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/zipfile/_path.py b/Lib/zipfile/_path.py index c2c804e..fd49a3e 100644 --- a/Lib/zipfile/_path.py +++ b/Lib/zipfile/_path.py @@ -86,6 +86,11 @@ class CompleteDirs(InitializedState, zipfile.ZipFile): """ A ZipFile subclass that ensures that implied directories are always included in the namelist. + + >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt'])) + ['foo/', 'foo/bar/'] + >>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt', 'foo/bar/'])) + ['foo/'] """ @staticmethod @@ -215,7 +220,7 @@ class Path: Read text: - >>> c.read_text() + >>> c.read_text(encoding='utf-8') 'content of c' existence: |