Commits

Brian Kearns  committed 75626e5

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

  • Participants
  • Parent commits f8175a0
  • Branches stdlib-2.7.6

Comments (0)

Files changed (2)

File pypy/module/_io/test/test_fileio.py

         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')

File pypy/module/_io/test/test_textio.py

             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")