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
cc4bacf2
Commit
cc4bacf2
authored
Oct 30, 2012
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#12890: fix test on windows
Patch by Stephen Tonkin.
parent
6b879fa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Lib/test/test_cgitb.py
Lib/test/test_cgitb.py
+4
-6
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Lib/test/test_cgitb.py
View file @
cc4bacf2
...
@@ -36,13 +36,12 @@ class TestCgitb(unittest.TestCase):
...
@@ -36,13 +36,12 @@ class TestCgitb(unittest.TestCase):
self
.
assertIn
(
"ValueError"
,
text
)
self
.
assertIn
(
"ValueError"
,
text
)
self
.
assertIn
(
"Hello World"
,
text
)
self
.
assertIn
(
"Hello World"
,
text
)
@
unittest
.
skipIf
(
sys
.
platform
==
'win32'
,
"test fails on windows, see issue 12890"
)
def
test_syshook_no_logdir_default_format
(
self
):
def
test_syshook_no_logdir_default_format
(
self
):
with
temp_dir
()
as
tracedir
:
with
temp_dir
()
as
tracedir
:
rc
,
out
,
err
=
assert_python_failure
(
rc
,
out
,
err
=
assert_python_failure
(
'-c'
,
'-c'
,
(
'import cgitb; cgitb.enable(logdir=
"%s"
); '
(
'import cgitb; cgitb.enable(logdir=
%s
); '
'raise ValueError("Hello World")'
)
%
tracedir
)
'raise ValueError("Hello World")'
)
%
repr
(
tracedir
)
)
out
=
out
.
decode
(
sys
.
getfilesystemencoding
())
out
=
out
.
decode
(
sys
.
getfilesystemencoding
())
self
.
assertIn
(
"ValueError"
,
out
)
self
.
assertIn
(
"ValueError"
,
out
)
self
.
assertIn
(
"Hello World"
,
out
)
self
.
assertIn
(
"Hello World"
,
out
)
...
@@ -50,14 +49,13 @@ class TestCgitb(unittest.TestCase):
...
@@ -50,14 +49,13 @@ class TestCgitb(unittest.TestCase):
self
.
assertIn
(
'<p>'
,
out
)
self
.
assertIn
(
'<p>'
,
out
)
self
.
assertIn
(
'</p>'
,
out
)
self
.
assertIn
(
'</p>'
,
out
)
@
unittest
.
skipIf
(
sys
.
platform
==
'win32'
,
"test fails on windows, see issue 12890"
)
def
test_syshook_no_logdir_text_format
(
self
):
def
test_syshook_no_logdir_text_format
(
self
):
# Issue 12890: we were emitting the <p> tag in text mode.
# Issue 12890: we were emitting the <p> tag in text mode.
with
temp_dir
()
as
tracedir
:
with
temp_dir
()
as
tracedir
:
rc
,
out
,
err
=
assert_python_failure
(
rc
,
out
,
err
=
assert_python_failure
(
'-c'
,
'-c'
,
(
'import cgitb; cgitb.enable(format="text", logdir=
"%s"
); '
(
'import cgitb; cgitb.enable(format="text", logdir=
%s
); '
'raise ValueError("Hello World")'
)
%
tracedir
)
'raise ValueError("Hello World")'
)
%
repr
(
tracedir
)
)
out
=
out
.
decode
(
sys
.
getfilesystemencoding
())
out
=
out
.
decode
(
sys
.
getfilesystemencoding
())
self
.
assertIn
(
"ValueError"
,
out
)
self
.
assertIn
(
"ValueError"
,
out
)
self
.
assertIn
(
"Hello World"
,
out
)
self
.
assertIn
(
"Hello World"
,
out
)
...
...
Misc/ACKS
View file @
cc4bacf2
...
@@ -1174,6 +1174,7 @@ Bennett Todd
...
@@ -1174,6 +1174,7 @@ Bennett Todd
R Lindsay Todd
R Lindsay Todd
Eugene Toder
Eugene Toder
Erik Tollerud
Erik Tollerud
Stephen Tonkin
Matias Torchinsky
Matias Torchinsky
Sandro Tosi
Sandro Tosi
Richard Townsend
Richard Townsend
...
...
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