Back to index

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

Classes

class  TestGenericUnivNewlines
class  TestCRNewlines
class  TestLFNewlines
class  TestCRLFNewlines
class  TestMixedNewlines

Functions

def test_main

Variables

string FATX = 'x'
list DATA_TEMPLATE
string DATA_LF = "\n"
string DATA_CR = "\r"
string DATA_CRLF = "\r\n"
string DATA_MIXED = "\n"
list DATA_SPLIT = [x + "\n" for x in DATA_TEMPLATE]

Function Documentation

Definition at line 109 of file test_univnewlines.py.

00109 
00110 def test_main():
00111     base_tests = (TestCRNewlines,
00112                   TestLFNewlines,
00113                   TestCRLFNewlines,
00114                   TestMixedNewlines)
00115     tests = []
00116     # Test the C and Python implementations.
00117     for test in base_tests:
00118         class CTest(test):
00119             open = io.open
00120         CTest.__name__ = "C" + test.__name__
00121         class PyTest(test):
00122             open = staticmethod(pyio.open)
00123         PyTest.__name__ = "Py" + test.__name__
00124         tests.append(CTest)
00125         tests.append(PyTest)
00126     support.run_unittest(*tests)


Variable Documentation

Definition at line 25 of file test_univnewlines.py.

Definition at line 26 of file test_univnewlines.py.

Definition at line 24 of file test_univnewlines.py.

Definition at line 30 of file test_univnewlines.py.

Definition at line 31 of file test_univnewlines.py.

Initial value:
00001 [
00002     "line1=1",
00003     "line2='this is a very long line designed to go past any default " +
00004         "buffer limits that exist in io.py but we also want to test " +
00005         "the uncommon case, naturally.'",
00006     "def line3():pass",
00007     "line4 = '%s'" % FATX,
00008     ]

Definition at line 15 of file test_univnewlines.py.

Definition at line 13 of file test_univnewlines.py.