mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #21520: test_zipfile no longer fails if the word 'bad' appears
anywhere in the name of the current directory.
This commit is contained in:
parent
b79e01248d
commit
7e63b36f7f
2 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -228,6 +228,9 @@ Library
|
|||
Tests
|
||||
-----
|
||||
|
||||
- Issue #21520: test_zipfile no longer fails if the word 'bad' appears
|
||||
anywhere in the name of the current directory.
|
||||
|
||||
- Issue #23799: Added test.support.start_threads() for running and
|
||||
cleaning up multiple threads.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue