Back to index

python3.2  3.2.2
Public Member Functions
test.test_memoryio.MemorySeekTestMixin Class Reference
Inheritance diagram for test.test_memoryio.MemorySeekTestMixin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def testInit
def testRead
def testReadNoArgs
def testSeek
def testTell

Detailed Description

Definition at line 13 of file test_memoryio.py.


Member Function Documentation

Definition at line 15 of file test_memoryio.py.

00015 
00016     def testInit(self):
00017         buf = self.buftype("1234567890")
00018         bytesIo = self.ioclass(buf)

Here is the call graph for this function:

Definition at line 19 of file test_memoryio.py.

00019 
00020     def testRead(self):
00021         buf = self.buftype("1234567890")
00022         bytesIo = self.ioclass(buf)
00023 
00024         self.assertEqual(buf[:1], bytesIo.read(1))
00025         self.assertEqual(buf[1:5], bytesIo.read(4))
00026         self.assertEqual(buf[5:], bytesIo.read(900))
00027         self.assertEqual(self.EOF, bytesIo.read())

Here is the call graph for this function:

Definition at line 28 of file test_memoryio.py.

00028 
00029     def testReadNoArgs(self):
00030         buf = self.buftype("1234567890")
00031         bytesIo = self.ioclass(buf)
00032 
00033         self.assertEqual(buf, bytesIo.read())
00034         self.assertEqual(self.EOF, bytesIo.read())

Here is the call graph for this function:

Definition at line 35 of file test_memoryio.py.

00035 
00036     def testSeek(self):
00037         buf = self.buftype("1234567890")
00038         bytesIo = self.ioclass(buf)
00039 
00040         bytesIo.read(5)
00041         bytesIo.seek(0)
00042         self.assertEqual(buf, bytesIo.read())
00043 
00044         bytesIo.seek(3)
00045         self.assertEqual(buf[3:], bytesIo.read())
00046         self.assertRaises(TypeError, bytesIo.seek, 0.0)

Here is the call graph for this function:

Definition at line 47 of file test_memoryio.py.

00047 
00048     def testTell(self):
00049         buf = self.buftype("1234567890")
00050         bytesIo = self.ioclass(buf)
00051 
00052         self.assertEqual(0, bytesIo.tell())
00053         bytesIo.seek(5)
00054         self.assertEqual(5, bytesIo.tell())
00055         bytesIo.seek(10000)
00056         self.assertEqual(10000, bytesIo.tell())
00057 

Here is the call graph for this function:


The documentation for this class was generated from the following file: