Back to index

python3.2  3.2.2
Classes | Public Member Functions
importlib.test.source.test_abc_loader.AbstractMethodImplTests Class Reference

List of all members.

Classes

class  ExecutionLoader
class  Finder
class  InspectLoader
class  Loader
class  PyLoader
class  PyPycLoader
class  ResourceLoader
class  SourceLoader

Public Member Functions

def raises_NotImplementedError
def test_Loader
def test_Finder
def test_ResourceLoader
def test_InspectLoader
def test_ExecutionLoader
def test_SourceLoader
def test_PyLoader
def test_PyPycLoader

Detailed Description

Test the concrete abstractmethod implementations.

Definition at line 765 of file test_abc_loader.py.


Member Function Documentation

Definition at line 812 of file test_abc_loader.py.

00812 
00813     def raises_NotImplementedError(self, ins, *args):
00814         for method_name in args:
00815             method = getattr(ins, method_name)
00816             arg_count = len(inspect.getfullargspec(method)[0]) - 1
00817             args = [''] * arg_count
00818             try:
00819                 method(*args)
00820             except NotImplementedError:
00821                 pass
00822             else:
00823                 msg = "{}.{} did not raise NotImplementedError"
00824                 self.fail(msg.format(ins.__class__.__name__, method_name))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 840 of file test_abc_loader.py.

00840 
00841     def test_ExecutionLoader(self):
00842         self.raises_NotImplementedError(self.ExecutionLoader(), 'load_module',
00843                                         'is_package', 'get_code', 'get_source',
00844                                         'get_filename')

Here is the call graph for this function:

Definition at line 829 of file test_abc_loader.py.

00829 
00830     def test_Finder(self):
00831         self.raises_NotImplementedError(self.Finder(), 'find_module')

Here is the call graph for this function:

Definition at line 836 of file test_abc_loader.py.

00836 
00837     def test_InspectLoader(self):
00838         self.raises_NotImplementedError(self.InspectLoader(), 'load_module',
00839                                         'is_package', 'get_code', 'get_source')

Here is the call graph for this function:

Definition at line 825 of file test_abc_loader.py.

00825 
00826     def test_Loader(self):
00827         self.raises_NotImplementedError(self.Loader(), 'load_module')

Here is the call graph for this function:

Definition at line 852 of file test_abc_loader.py.

00852 
00853     def test_PyLoader(self):
00854         self.raises_NotImplementedError(self.PyLoader(), 'source_path',
00855                                         'get_data', 'is_package')

Here is the call graph for this function:

Definition at line 856 of file test_abc_loader.py.

00856 
00857     def test_PyPycLoader(self):
00858         self.raises_NotImplementedError(self.PyPycLoader(), 'source_path',
00859                                         'source_mtime', 'bytecode_path',
00860                                         'write_bytecode')
00861 

Here is the call graph for this function:

Definition at line 832 of file test_abc_loader.py.

00832 
00833     def test_ResourceLoader(self):
00834         self.raises_NotImplementedError(self.ResourceLoader(), 'load_module',
00835                                         'get_data')

Here is the call graph for this function:

Definition at line 845 of file test_abc_loader.py.

00845 
00846     def test_SourceLoader(self):
00847         ins = self.SourceLoader()
00848         # Required abstractmethods.
00849         self.raises_NotImplementedError(ins, 'get_filename', 'get_data')
00850         # Optional abstractmethods.
00851         self.raises_NotImplementedError(ins,'path_mtime', 'set_data')

Here is the call graph for this function:


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