Alexandre Vassalotti committed 02a8142

Added tests to check the buffer type returned during reading.

Comments (0)

Files changed (1)


         self.assertEqual(, buf)
+        self.assertEqual(type(, type(buf))
         self.assertEqual(, buf)
         self.assertRaises(TypeError,, '')
         self.assertEqual(memio.readline(), buf[:-1])
         self.assertEqual(memio.readline(), self.EOF)
+        self.assertEqual(type(memio.readline()), type(buf))
         self.assertEqual(memio.readline(None), buf)
         self.assertRaises(TypeError, memio.readline, '')
         self.assertEqual(memio.readlines(0), [buf] * 10)
+        self.assertEqual(type(memio.readlines()[0]), type(buf))
         self.assertEqual(memio.readlines(None), [buf] * 10)
         self.assertRaises(TypeError, memio.readlines, '')
         self.assertEqual(memio.getvalue(), buf)
         self.assertEqual(memio.getvalue(), buf)
+        self.assertEqual(type(memio.getvalue()), type(buf))
         memio = self.ioclass(buf * 1000)
         self.assertEqual(memio.getvalue()[-3:], self.buftype("890"))
         memio = self.ioclass(buf)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.