diff --git a/tests/test_complexity.py b/tests/test_complexity.py index d2adcf1..e2445e1 100644 --- a/tests/test_complexity.py +++ b/tests/test_complexity.py @@ -85,7 +85,7 @@ def test_glob_depth(self): max_n=100, min_n=1, ) - assert best <= big_o.complexities.Quadratic + assert best <= big_o.complexities.Linear @pytest.mark.flaky def test_glob_width(self): diff --git a/zipp/__init__.py b/zipp/__init__.py index a1b9884..da9687c 100644 --- a/zipp/__init__.py +++ b/zipp/__init__.py @@ -399,7 +399,8 @@ def glob(self, pattern): prefix = re.escape(self.at) tr = Translator(seps='/') matches = re.compile(prefix + tr.translate(pattern)).fullmatch - return map(self._next, filter(matches, self.root.namelist())) + names = (data.filename for data in self.root.filelist) + return map(self._next, filter(matches, names)) def rglob(self, pattern): return self.glob(f'**/{pattern}')