File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -719,9 +719,10 @@ def test_write_filtered_python_package(self):
719719 self .assertTrue ('SyntaxError' not in reportStr )
720720
721721 # then check that the filter works on individual files
722+ def filter (path ):
723+ return not os .path .basename (path ).startswith ("bad" )
722724 with captured_stdout () as reportSIO , self .assertWarns (UserWarning ):
723- zipfp .writepy (packagedir , filterfunc = lambda fn :
724- 'bad' not in fn )
725+ zipfp .writepy (packagedir , filterfunc = filter )
725726 reportStr = reportSIO .getvalue ()
726727 if reportStr :
727728 print (reportStr )
Original file line number Diff line number Diff line change @@ -228,6 +228,9 @@ Library
228228Tests
229229-----
230230
231+ - Issue #21520: test_zipfile no longer fails if the word 'bad' appears
232+ anywhere in the name of the current directory.
233+
231234- Issue #23799: Added test.support.start_threads() for running and
232235 cleaning up multiple threads.
233236
You can’t perform that action at this time.
0 commit comments