Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7e63b36f
Commit
7e63b36f
authored
May 08, 2015
by
Larry Hastings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #21520: test_zipfile no longer fails if the word 'bad' appears
anywhere in the name of the current directory.
parent
b79e0124
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/test/test_zipfile.py
Lib/test/test_zipfile.py
+3
-2
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_zipfile.py
View file @
7e63b36f
...
@@ -719,9 +719,10 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -719,9 +719,10 @@ class PyZipFileTests(unittest.TestCase):
self
.
assertTrue
(
'SyntaxError'
not
in
reportStr
)
self
.
assertTrue
(
'SyntaxError'
not
in
reportStr
)
# then check that the filter works on individual files
# 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
):
with
captured_stdout
()
as
reportSIO
,
self
.
assertWarns
(
UserWarning
):
zipfp
.
writepy
(
packagedir
,
filterfunc
=
lambda
fn
:
zipfp
.
writepy
(
packagedir
,
filterfunc
=
filter
)
'bad'
not
in
fn
)
reportStr
=
reportSIO
.
getvalue
()
reportStr
=
reportSIO
.
getvalue
()
if
reportStr
:
if
reportStr
:
print
(
reportStr
)
print
(
reportStr
)
...
...
Misc/NEWS
View file @
7e63b36f
...
@@ -228,6 +228,9 @@ Library
...
@@ -228,6 +228,9 @@ Library
Tests
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
- Issue #23799: Added test.support.start_threads() for running and
cleaning up multiple threads.
cleaning up multiple threads.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment