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
692e26be
Commit
692e26be
authored
Jul 05, 2011
by
Brian Curtin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalize whitespace for #11512 fix.
parent
6a4ffd72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Lib/test/test_cgitb.py
Lib/test/test_cgitb.py
+7
-7
No files found.
Lib/test/test_cgitb.py
View file @
692e26be
...
...
@@ -5,19 +5,19 @@ import subprocess
import
cgitb
class
TestCgitb
(
unittest
.
TestCase
):
def
test_fonts
(
self
):
text
=
"Hello Robbie!"
self
.
assertEqual
(
cgitb
.
small
(
text
),
"<small>{}</small>"
.
format
(
text
))
self
.
assertEqual
(
cgitb
.
strong
(
text
),
"<strong>{}</strong>"
.
format
(
text
))
self
.
assertEqual
(
cgitb
.
grey
(
text
),
'<font color="#909090">{}</font>'
.
format
(
text
))
def
test_blanks
(
self
):
self
.
assertEqual
(
cgitb
.
small
(
""
),
""
)
self
.
assertEqual
(
cgitb
.
strong
(
""
),
""
)
self
.
assertEqual
(
cgitb
.
grey
(
""
),
""
)
def
test_html
(
self
):
try
:
raise
ValueError
(
"Hello World"
)
...
...
@@ -35,11 +35,11 @@ class TestCgitb(unittest.TestCase):
text
=
cgitb
.
text
(
sys
.
exc_info
())
self
.
assertIn
(
"ValueError"
,
text
)
self
.
assertIn
(
"Hello World"
,
text
)
def
test_hook
(
self
):
proc
=
subprocess
.
Popen
([
sys
.
executable
,
'-c'
,
(
'import cgitb;'
'cgitb.enable();'
(
'import cgitb;'
'cgitb.enable();'
'raise ValueError("Hello World")'
)],
stdout
=
subprocess
.
PIPE
)
out
=
proc
.
stdout
.
read
().
decode
(
sys
.
getfilesystemencoding
())
...
...
@@ -50,6 +50,6 @@ class TestCgitb(unittest.TestCase):
def
test_main
():
run_unittest
(
TestCgitb
)
if
__name__
==
"__main__"
:
test_main
()
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