Back to index

python3.2  3.2.2
Public Member Functions
importlib.test.source.test_source_encoding.LineEndingTest Class Reference

List of all members.

Public Member Functions

def run_test
def test_cr
def test_crlf
def test_lf

Detailed Description

Definition at line 88 of file test_source_encoding.py.


Member Function Documentation

Definition at line 93 of file test_source_encoding.py.

00093 
00094     def run_test(self, line_ending):
00095         module_name = '_temp'
00096         source_lines = [b"a = 42", b"b = -13", b'']
00097         source = line_ending.join(source_lines)
00098         with source_util.create_modules(module_name) as mapping:
00099             with open(mapping[module_name], 'wb') as file:
00100                 file.write(source)
00101             loader = _bootstrap._SourceFileLoader(module_name,
00102                                                  mapping[module_name])
00103             return loader.load_module(module_name)

Here is the caller graph for this function:

Definition at line 105 of file test_source_encoding.py.

00105 
00106     def test_cr(self):
00107         self.run_test(b'\r')

Here is the call graph for this function:

Definition at line 109 of file test_source_encoding.py.

00109 
00110     def test_crlf(self):
00111         self.run_test(b'\r\n')

Here is the call graph for this function:

Definition at line 113 of file test_source_encoding.py.

00113 
00114     def test_lf(self):
00115         self.run_test(b'\n')
00116 

Here is the call graph for this function:


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