mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
parent
6b879fa402
commit
cc4bacf207
2 changed files with 5 additions and 6 deletions
|
@ -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):
|
||||||
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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue