Public Member Functions | |
def | __init__ (cls, name, bases, d) |
def | __init__ (cls, name, bases, d) |
Static Public Member Functions | |
def | CleanUpTest (cls, func) |
def | CleanUpTest (cls, func) |
Metaclass to add mox cleanup and verification to every test. As the mox unit testing class is being constructed (MoxTestBase or a subclass), this metaclass will modify all test functions to call the CleanUpMox method of the test class after they finish. This means that unstubbing and verifying will happen for every test with no additional code, and any failures will result in test failures as opposed to errors.
Definition at line 1334 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MoxMetaTestBase.__init__ | ( | cls, | |
name, | |||
bases, | |||
d | |||
) |
Definition at line 1344 of file bloaty/third_party/protobuf/python/mox.py.
def mox.MoxMetaTestBase.__init__ | ( | cls, | |
name, | |||
bases, | |||
d | |||
) |
Definition at line 1344 of file protobuf/python/mox.py.
|
static |
Adds Mox cleanup code to any MoxTestBase method. Always unsets stubs after a test. Will verify all mocks for tests that otherwise pass. Args: cls: MoxTestBase or subclass; the class whose test method we are altering. func: method; the method of the MoxTestBase test class we wish to alter. Returns: The modified method.
Definition at line 1358 of file bloaty/third_party/protobuf/python/mox.py.
|
static |
Adds Mox cleanup code to any MoxTestBase method. Always unsets stubs after a test. Will verify all mocks for tests that otherwise pass. Args: cls: MoxTestBase or subclass; the class whose test method we are altering. func: method; the method of the MoxTestBase test class we wish to alter. Returns: The modified method.
Definition at line 1358 of file protobuf/python/mox.py.