From 84f25fe04f4be7b94f0f5b33125c563606b1d608 Mon Sep 17 00:00:00 2001 From: Vadim Lebedev Date: Mon, 18 Jul 2022 19:28:37 +0200 Subject: [PATCH] Fix tests --- tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests.py b/tests.py index baec6dc..8bc5894 100644 --- a/tests.py +++ b/tests.py @@ -176,6 +176,13 @@ class TestZipWrite(unittest.TestCase): z.writepath(f) z.close() + def test_writepath_with_password(self): + z = ZipFile(self.f, 'w', password='test') + for fname in FILENAMES: + with open(os.path.join(TMPDIR, fname), 'r') as f: + z.writepath(f) + z.close() + def test_writepath_directory(self): """ Test writing a directory. """ z = ZipFile(self.f, 'w')