[Python-checkins] r69813 - python/branches/io-c/Lib/test/test_memoryio.py

antoine.pitrou python-checkins at python.org
Fri Feb 20 20:58:23 CET 2009


Author: antoine.pitrou
Date: Fri Feb 20 20:58:22 2009
New Revision: 69813

Log:
Add a test for StringIO properties



Modified:
   python/branches/io-c/Lib/test/test_memoryio.py

Modified: python/branches/io-c/Lib/test/test_memoryio.py
==============================================================================
--- python/branches/io-c/Lib/test/test_memoryio.py	(original)
+++ python/branches/io-c/Lib/test/test_memoryio.py	Fri Feb 20 20:58:22 2009
@@ -380,6 +380,15 @@
         self.assertRaises(IOError, memio.seek, 1, 1)
         self.assertRaises(IOError, memio.seek, 1, 2)
 
+    def test_textio_properties(self):
+        memio = self.ioclass()
+
+        # These are just dummy values but we nevertheless check them for fear
+        # of unexpected breakage.
+        self.assertEqual(memio.encoding, "utf-8")
+        self.assertEqual(memio.errors, "strict")
+        self.assertEqual(memio.line_buffering, False)
+
     # XXX: For the Python version of io.StringIO, this is highly
     # dependent on the encoding used for the underlying buffer.
     # def test_widechar(self):


More information about the Python-checkins mailing list