diff -r 6b2db7fc17f7 Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Wed Jun 11 04:31:29 2014 -0700 +++ b/Lib/test/test_zipfile.py Wed Jun 11 04:41:19 2014 -0700 @@ -647,8 +647,8 @@ # then check that the filter works on individual files with captured_stdout() as reportSIO, self.assertWarns(UserWarning): - zipfp.writepy(packagedir, filterfunc=lambda fn: - 'bad' not in fn) + zipfp.writepy(packagedir, filterfunc=lambda path: + not os.path.basename(path).startswith("bad")) reportStr = reportSIO.getvalue() if reportStr: print(reportStr)