[Python-checkins] cpython (3.3): #12890: fix test on windows

r.david.murray python-checkins at python.org
Wed Oct 31 01:21:27 CET 2012


http://hg.python.org/cpython/rev/7648b7ed6d91
changeset:   80070:7648b7ed6d91
branch:      3.3
parent:      80055:ed00aab17d8c
user:        R David Murray <rdmurray at bitdance.com>
date:        Tue Oct 30 20:20:09 2012 -0400
summary:
  #12890: fix test on windows

Patch by Stephen Tonkin.

files:
  Lib/test/test_cgitb.py |  10 ++++------
  Misc/ACKS              |   1 +
  2 files changed, 5 insertions(+), 6 deletions(-)


diff --git a/Lib/test/test_cgitb.py b/Lib/test/test_cgitb.py
--- a/Lib/test/test_cgitb.py
+++ b/Lib/test/test_cgitb.py
@@ -36,13 +36,12 @@
             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 @@
         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)
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1174,6 +1174,7 @@
 R Lindsay Todd
 Eugene Toder
 Erik Tollerud
+Stephen Tonkin
 Matias Torchinsky
 Sandro Tosi
 Richard Townsend

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list