summaryrefslogtreecommitdiff
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-05-08 06:58:56 -0700
committerLarry Hastings <larry@hastings.org>2015-05-08 06:58:56 -0700
commit809325459750897bedd393893869a076fa6655a6 (patch)
tree875647de5c9cbe75d4d64ecf62d652beb4f9f1b6 /Lib/test/test_zipfile.py
parent0048835e49ac79e416b2318f39b7a696cb053384 (diff)
parent7e63b36f7f6975b3d7590fc1c12caf04c39b2e7e (diff)
downloadcpython-git-809325459750897bedd393893869a076fa6655a6.tar.gz
Merge from 3.4.
Diffstat (limited to 'Lib/test/test_zipfile.py')
-rw-r--r--Lib/test/test_zipfile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index aa8c463dab..67e85704aa 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -750,9 +750,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)