Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes | Private Attributes
importlib.test.test_abc.InheritanceTests Class Reference
Inheritance diagram for importlib.test.test_abc.InheritanceTests:
Inheritance graph

List of all members.

Public Member Functions

def __init__
def test_subclasses
def test_superclasses

Static Public Attributes

list subclasses = []
list superclasses = []

Private Attributes


Detailed Description

Test that the specified class is a subclass/superclass of the expected

Definition at line 7 of file

Constructor & Destructor Documentation

def importlib.test.test_abc.InheritanceTests.__init__ (   self,

Definition at line 15 of file

00016     def __init__(self, *args, **kwargs):
00017         super().__init__(*args, **kwargs)
00018         assert self.subclasses or self.superclasses, self.__class__
00019         self.__test = getattr(abc, self.__class__.__name__)

Here is the caller graph for this function:

Member Function Documentation

Definition at line 20 of file

00021     def test_subclasses(self):
00022         # Test that the expected subclasses inherit.
00023         for subclass in self.subclasses:
00024             self.assertTrue(issubclass(subclass, self.__test),
00025                 "{0} is not a subclass of {1}".format(subclass, self.__test))

Here is the call graph for this function:

Definition at line 26 of file

00027     def test_superclasses(self):
00028         # Test that the class inherits from the expected superclasses.
00029         for superclass in self.superclasses:
00030             self.assertTrue(issubclass(self.__test, superclass),
00031                "{0} is not a superclass of {1}".format(superclass, self.__test))

Here is the call graph for this function:

Member Data Documentation

Definition at line 18 of file

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