TestData
Descriptor to provide TestCase instance isolation for attributes assigned during the setUpTestData() phase.
Attributes
| Attribute | Type | Description |
|---|---|---|
| memo_attr | string = _testdata_memo | The name of the attribute on the test case instance used to store the deepcopy memo dictionary for maintaining object relationships. |
Constructor
Signature
def TestData(
name: string,
data: any
)
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The name of the attribute being managed. |
| data | any | The original data object to be deep copied for test isolation. |
Methods
get_memo()
@classmethod
def get_memo(
testcase: object
) - > dict
Retrieves or initializes a dictionary on the test case instance used to track object identities during deep copy operations.
Parameters
| Name | Type | Description |
|---|---|---|
| testcase | object | The TestCase instance where the memoization state is stored. |
Returns
| Type | Description |
|---|---|
dict | The memoization dictionary associated with the specific test case instance. |