Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.6
Changeset: r69691:75626e530f39
Date: 2014-03-04 16:57 -0500
http://bitbucket.org/pypy/pypy/changeset/75626e530f39/

Log:    move this test to test_textio.py so it has _locale module

        needed for locale.getpreferredencoding() on posix if LANG env vars
        are not set

diff --git a/pypy/module/_io/test/test_fileio.py 
b/pypy/module/_io/test/test_fileio.py
--- a/pypy/module/_io/test/test_fileio.py
+++ b/pypy/module/_io/test/test_fileio.py
@@ -99,13 +99,6 @@
         f.close()
         f2.close()
 
-    def test_writelines_error(self):
-        import _io
-        txt = _io.TextIOWrapper(_io.BytesIO())
-        raises(TypeError, txt.writelines, [1, 2, 3])
-        raises(TypeError, txt.writelines, None)
-        raises(TypeError, txt.writelines, b'abc')
-
     def test_seek(self):
         import _io
         f = _io.FileIO(self.tmpfile, 'rb')
diff --git a/pypy/module/_io/test/test_textio.py 
b/pypy/module/_io/test/test_textio.py
--- a/pypy/module/_io/test/test_textio.py
+++ b/pypy/module/_io/test/test_textio.py
@@ -111,6 +111,13 @@
             assert f.read() == data * 2
             assert buf.getvalue() == (data * 2).encode(encoding)
 
+    def test_writelines_error(self):
+        import _io
+        txt = _io.TextIOWrapper(_io.BytesIO())
+        raises(TypeError, txt.writelines, [1, 2, 3])
+        raises(TypeError, txt.writelines, None)
+        raises(TypeError, txt.writelines, b'abc')
+
     def test_tell(self):
         import _io
         r = _io.BytesIO("abc\ndef\n")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to