class documentation

Tests for the patch() helper method in unittest.TestCase.

Method setUp Setup our test case
Method test_patch Calling patch() on a test monkey patches the specified object and attribute.
Method test_patchRestoredAfterRun Any monkey patches introduced by a test using patch() are reverted after the test has run.
Method test_revertAndRepatch The returned monkey.MonkeyPatcher object can re-apply the patch during the test run.
Method test_revertDuringTest patch() return a monkey.MonkeyPatcher object that can be used to restore the original values before the end of the test.
Method test_successivePatches Successive patches are applied and reverted just like a single patch.
Instance Variable objectToPatch Undocumented
Instance Variable originalValue Undocumented
Instance Variable patchedValue Undocumented
Instance Variable test Undocumented
def setUp(self): (source)

Setup our test case

def test_patch(self): (source)

Calling patch() on a test monkey patches the specified object and attribute.

def test_patchRestoredAfterRun(self): (source)

Any monkey patches introduced by a test using patch() are reverted after the test has run.

def test_revertAndRepatch(self): (source)

The returned monkey.MonkeyPatcher object can re-apply the patch during the test run.

def test_revertDuringTest(self): (source)

patch() return a monkey.MonkeyPatcher object that can be used to restore the original values before the end of the test.

def test_successivePatches(self): (source)

Successive patches are applied and reverted just like a single patch.

objectToPatch = (source)

Undocumented

originalValue: str = (source)

Undocumented

patchedValue: str = (source)

Undocumented

Undocumented