diff options
Diffstat (limited to 'Lib/test/test_zipfile.py')
| -rw-r--r-- | Lib/test/test_zipfile.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 3d8f9bc..0c4c579 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -719,9 +719,10 @@ class PyZipFileTests(unittest.TestCase): self.assertTrue('SyntaxError' not in reportStr) # then check that the filter works on individual files + def filter(path): + return not os.path.basename(path).startswith("bad") with captured_stdout() as reportSIO, self.assertWarns(UserWarning): - zipfp.writepy(packagedir, filterfunc=lambda fn: - 'bad' not in fn) + zipfp.writepy(packagedir, filterfunc=filter) reportStr = reportSIO.getvalue() if reportStr: print(reportStr) |
