Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_io Namespace Reference

Classes

class  MockRawIOWithoutRead
class  CMockRawIOWithoutRead
class  PyMockRawIOWithoutRead
class  MockRawIO
class  CMockRawIO
class  PyMockRawIO
class  MisbehavedRawIO
class  CMisbehavedRawIO
class  PyMisbehavedRawIO
class  CloseFailureIO
class  CCloseFailureIO
class  PyCloseFailureIO
class  MockFileIO
class  CMockFileIO
class  PyMockFileIO
class  MockUnseekableIO
class  CMockUnseekableIO
class  PyMockUnseekableIO
class  MockNonBlockWriterIO
class  CMockNonBlockWriterIO
class  PyMockNonBlockWriterIO
class  IOTest
class  CIOTest
class  PyIOTest
class  CommonBufferedTests
class  BufferedReaderTest
class  CBufferedReaderTest
class  PyBufferedReaderTest
class  BufferedWriterTest
class  CBufferedWriterTest
class  PyBufferedWriterTest
class  BufferedRWPairTest
class  CBufferedRWPairTest
class  PyBufferedRWPairTest
class  BufferedRandomTest
class  CBufferedRandomTest
class  PyBufferedRandomTest
class  StatefulIncrementalDecoder
class  StatefulIncrementalDecoderTest
class  TextIOWrapperTest
class  CTextIOWrapperTest
class  PyTextIOWrapperTest
class  IncrementalNewlineDecoderTest
class  CIncrementalNewlineDecoderTest
class  PyIncrementalNewlineDecoderTest
class  MiscIOTest
class  CMiscIOTest
class  PyMiscIOTest
class  SignalsTest
class  CSignalsTest
class  PySignalsTest

Functions

def _default_chunk_size
def test_main

Variables

 threading = None

Detailed Description

Unit tests for the io module.

Function Documentation

Get the default TextIOWrapper chunk size

Definition at line 47 of file test_io.py.

00047 
00048 def _default_chunk_size():
00049     """Get the default TextIOWrapper chunk size"""
00050     with open(__file__, "r", encoding="latin1") as f:
00051         return f._CHUNK_SIZE
00052 

Here is the caller graph for this function:

Definition at line 2881 of file test_io.py.

02881 
02882 def test_main():
02883     tests = (CIOTest, PyIOTest,
02884              CBufferedReaderTest, PyBufferedReaderTest,
02885              CBufferedWriterTest, PyBufferedWriterTest,
02886              CBufferedRWPairTest, PyBufferedRWPairTest,
02887              CBufferedRandomTest, PyBufferedRandomTest,
02888              StatefulIncrementalDecoderTest,
02889              CIncrementalNewlineDecoderTest, PyIncrementalNewlineDecoderTest,
02890              CTextIOWrapperTest, PyTextIOWrapperTest,
02891              CMiscIOTest, PyMiscIOTest,
02892              CSignalsTest, PySignalsTest,
02893              )
02894 
02895     # Put the namespaces of the IO module we are testing and some useful mock
02896     # classes in the __dict__ of each test.
02897     mocks = (MockRawIO, MisbehavedRawIO, MockFileIO, CloseFailureIO,
02898              MockNonBlockWriterIO, MockUnseekableIO, MockRawIOWithoutRead)
02899     all_members = io.__all__ + ["IncrementalNewlineDecoder"]
02900     c_io_ns = {name : getattr(io, name) for name in all_members}
02901     py_io_ns = {name : getattr(pyio, name) for name in all_members}
02902     globs = globals()
02903     c_io_ns.update((x.__name__, globs["C" + x.__name__]) for x in mocks)
02904     py_io_ns.update((x.__name__, globs["Py" + x.__name__]) for x in mocks)
02905     # Avoid turning open into a bound method.
02906     py_io_ns["open"] = pyio.OpenWrapper
02907     for test in tests:
02908         if test.__name__.startswith("C"):
02909             for name, obj in c_io_ns.items():
02910                 setattr(test, name, obj)
02911         elif test.__name__.startswith("Py"):
02912             for name, obj in py_io_ns.items():
02913                 setattr(test, name, obj)
02914 
02915     support.run_unittest(*tests)

Here is the call graph for this function:


Variable Documentation

Definition at line 44 of file test_io.py.