diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-10-31 00:20:09 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-10-31 00:20:09 (GMT) |
commit | cc4bacf2070f83479abb54592c35c7d2c6508000 (patch) | |
tree | 6fc3b3521fc216158dd2ad1c29f497484b8aada4 | |
parent | 6b879fa402cfb23136d0004c2ed154cdc76db919 (diff) | |
download | cpython-cc4bacf2070f83479abb54592c35c7d2c6508000.zip cpython-cc4bacf2070f83479abb54592c35c7d2c6508000.tar.gz cpython-cc4bacf2070f83479abb54592c35c7d2c6508000.tar.bz2 |
#12890: fix test on windows
Patch by Stephen Tonkin.
-rw-r--r-- | Lib/test/test_cgitb.py | 10 | ||||
-rw-r--r-- | Misc/ACKS | 1 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Lib/test/test_cgitb.py b/Lib/test/test_cgitb.py index b91fe50..2e072a9 100644 --- a/Lib/test/test_cgitb.py +++ b/Lib/test/test_cgitb.py @@ -36,13 +36,12 @@ class TestCgitb(unittest.TestCase): self.assertIn("ValueError", 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): with temp_dir() as tracedir: rc, out, err = assert_python_failure( '-c', - ('import cgitb; cgitb.enable(logdir="%s"); ' - 'raise ValueError("Hello World")') % tracedir) + ('import cgitb; cgitb.enable(logdir=%s); ' + 'raise ValueError("Hello World")') % repr(tracedir)) out = out.decode(sys.getfilesystemencoding()) self.assertIn("ValueError", out) self.assertIn("Hello World", out) @@ -50,14 +49,13 @@ class TestCgitb(unittest.TestCase): 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): # Issue 12890: we were emitting the <p> tag in text mode. with temp_dir() as tracedir: rc, out, err = assert_python_failure( '-c', - ('import cgitb; cgitb.enable(format="text", logdir="%s"); ' - 'raise ValueError("Hello World")') % tracedir) + ('import cgitb; cgitb.enable(format="text", logdir=%s); ' + 'raise ValueError("Hello World")') % repr(tracedir)) out = out.decode(sys.getfilesystemencoding()) self.assertIn("ValueError", out) self.assertIn("Hello World", out) @@ -1174,6 +1174,7 @@ Bennett Todd R Lindsay Todd Eugene Toder Erik Tollerud +Stephen Tonkin Matias Torchinsky Sandro Tosi Richard Townsend |