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
e98e8a3a
Commit
e98e8a3a
authored
Dec 13, 2010
by
Nick Coghlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Captured IO streams with embedded backslashes are always such a fun combination...
parent
9466fe88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Lib/test/test_tempfile.py
Lib/test/test_tempfile.py
+8
-2
No files found.
Lib/test/test_tempfile.py
View file @
e98e8a3a
...
...
@@ -989,7 +989,13 @@ class test_TemporaryDirectory(TC):
# Issue 10888: may write to stderr if modules are nulled out
# ResourceWarning will be triggered by __del__
with
self
.
do_create
()
as
dir
:
d
=
self
.
do_create
(
dir
=
dir
)
if
os
.
sep
!=
'
\
\
'
:
# Embed a backslash in order to make sure string escaping
# in the displayed error message is dealt with correctly
suffix
=
'
\
\
check_backslash_handling'
else
:
suffix
=
''
d
=
self
.
do_create
(
dir
=
dir
,
suf
=
suffix
)
#Check for the Issue 10888 message
modules
=
[
os
,
os
.
path
]
...
...
@@ -998,7 +1004,7 @@ class test_TemporaryDirectory(TC):
with
support
.
captured_stderr
()
as
err
:
with
NulledModules
(
*
modules
):
d
.
cleanup
()
message
=
err
.
getvalue
()
message
=
err
.
getvalue
()
.
replace
(
'
\
\
\
\
'
,
'
\
\
'
)
self
.
assertIn
(
"while cleaning up"
,
message
)
self
.
assertIn
(
d
.
name
,
message
)
...
...
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