Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.6
Changeset: r69645:e6b97653a8c7
Date: 2014-03-03 18:04 -0500
http://bitbucket.org/pypy/pypy/changeset/e6b97653a8c7/

Log:    fix test_file failures on windows

diff --git a/pypy/module/_file/test/test_file.py 
b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -252,7 +252,7 @@
         assert os.strerror(errno.EBADF) in g.getvalue()
         # the following is a "nice to have" feature that CPython doesn't have
         if '__pypy__' in sys.builtin_module_names:
-            assert self.temppath in g.getvalue()
+            assert repr(self.temppath) in g.getvalue()
 
 
 class AppTestNonblocking(object):
diff --git a/pypy/module/_file/test/test_file_extra.py 
b/pypy/module/_file/test/test_file_extra.py
--- a/pypy/module/_file/test/test_file_extra.py
+++ b/pypy/module/_file/test/test_file_extra.py
@@ -201,12 +201,12 @@
 
     def test_repr(self):
         assert repr(self.file).startswith(
-            "<open file '%s', mode '%s' at 0x" % (
-                self.expected_filename, self.expected_mode))
+            "<open file %r, mode '%s' at 0x" %
+            (self.expected_filename, self.expected_mode))
         self.file.close()
         assert repr(self.file).startswith(
-            "<closed file '%s', mode '%s' at 0x" % (
-                self.expected_filename, self.expected_mode))
+            "<closed file %r, mode '%s' at 0x" %
+            (self.expected_filename, self.expected_mode))
 
 # ____________________________________________________________
 #
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to