From 58115d2be968644ce71ce6bcc9b79826c82a1806 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 31 May 2024 12:24:39 -0400 Subject: [PATCH] Employ SanitizedNames in CompleteDirs. Fixes broken test. --- tests/test_path.py | 1 - zipp/__init__.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_path.py b/tests/test_path.py index 53f8848..ace8763 100644 --- a/tests/test_path.py +++ b/tests/test_path.py @@ -572,7 +572,6 @@ def test_getinfo_missing(self, alpharep): with self.assertRaises(KeyError): alpharep.getinfo('does-not-exist') - @__import__('pytest').mark.skip(reason="infinite loop") def test_malformed_paths(self): """ Path should handle malformed paths. diff --git a/zipp/__init__.py b/zipp/__init__.py index b2f5013..f41ae08 100644 --- a/zipp/__init__.py +++ b/zipp/__init__.py @@ -148,7 +148,7 @@ def allowed(part): return joined + '/' * name.endswith('/') -class CompleteDirs(InitializedState, zipfile.ZipFile): +class CompleteDirs(InitializedState, SanitizedNames, zipfile.ZipFile): """ A ZipFile subclass that ensures that implied directories are always included in the namelist.