diff --git a/test_zipp.py b/test_zipp.py index 536f7d2..e35f06c 100644 --- a/test_zipp.py +++ b/test_zipp.py @@ -4,7 +4,6 @@ import io import zipfile -import posixpath import contextlib import tempfile import shutil @@ -207,8 +206,8 @@ def test_mutability(self): for alpharep in self.zipfile_alpharep(): root = zipp.Path(alpharep) a, b, g = root.iterdir() - alpharep.writestr('foo.txt', 'foo') - alpharep.writestr('bar/baz.txt', 'baz') + alpharep.writestr('foo.txt', b'foo') + alpharep.writestr('bar/baz.txt', b'baz') assert any( child.name == 'foo.txt' for child in root.iterdir()) diff --git a/zipp.py b/zipp.py index 8c1b78d..2ede259 100644 --- a/zipp.py +++ b/zipp.py @@ -77,7 +77,7 @@ def _implied_dirs(names): return implied_dirs def namelist(self): - names = super().namelist() + names = super(CompleteDirs, self).namelist() return names + list(self._implied_dirs(names)) def _name_set(self): @@ -122,13 +122,13 @@ class FastLookup(CompleteDirs): def namelist(self): with suppress(AttributeError): return self.__names - self.__names = super().namelist() + self.__names = super(FastLookup, self).namelist() return self.__names def _name_set(self): with suppress(AttributeError): return self.__lookup - self.__lookup = super()._name_set() + self.__lookup = super(FastLookup, self)._name_set() return self.__lookup