Skip to main content

TestData

Descriptor to provide TestCase instance isolation for attributes assigned during the setUpTestData() phase.

Attributes

AttributeTypeDescription
memo_attrstring = _testdata_memoThe 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

NameTypeDescription
namestringThe name of the attribute being managed.
dataanyThe 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

NameTypeDescription
testcaseobjectThe TestCase instance where the memoization state is stored.

Returns

TypeDescription
dictThe memoization dictionary associated with the specific test case instance.