Back to index

python3.2  3.2.2
Public Member Functions
importlib.test.builtin.test_loader.InspectLoaderTests Class Reference

List of all members.

Public Member Functions

def test_get_code
def test_get_source
def test_is_package
def test_not_builtin

Detailed Description

Tests for InspectLoader methods for BuiltinImporter.

Definition at line 68 of file test_loader.py.


Member Function Documentation

Definition at line 72 of file test_loader.py.

00072 
00073     def test_get_code(self):
00074         # There is no code object.
00075         result = machinery.BuiltinImporter.get_code(builtin_util.NAME)
00076         self.assertTrue(result is None)

Here is the call graph for this function:

Definition at line 77 of file test_loader.py.

00077 
00078     def test_get_source(self):
00079         # There is no source.
00080         result = machinery.BuiltinImporter.get_source(builtin_util.NAME)
00081         self.assertTrue(result is None)

Here is the call graph for this function:

Definition at line 82 of file test_loader.py.

00082 
00083     def test_is_package(self):
00084         # Cannot be a package.
00085         result = machinery.BuiltinImporter.is_package(builtin_util.NAME)
00086         self.assertTrue(not result)

Here is the call graph for this function:

Definition at line 87 of file test_loader.py.

00087 
00088     def test_not_builtin(self):
00089         # Modules not built-in should raise ImportError.
00090         for meth_name in ('get_code', 'get_source', 'is_package'):
00091             method = getattr(machinery.BuiltinImporter, meth_name)
00092         with self.assertRaises(ImportError):
00093             method(builtin_util.BAD_NAME)
00094 
00095 

Here is the call graph for this function:


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