Commit 692e26be authored by Brian Curtin's avatar Brian Curtin

Normalize whitespace for #11512 fix.

parent 6a4ffd72
......@@ -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()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment