Skip to main content

SerializeMixin

Enforce serialization of TestCases that share a common resource.

Attributes

AttributeTypeDescription
lockfilefile path = NoneDefine a common 'lockfile' for each set of TestCases to serialize. This file must exist on the filesystem.

Methods


setUpClass()

@classmethod
def setUpClass() - > null

Acquires an exclusive filesystem lock on the specified lockfile before running any tests in the class. This ensures that test cases sharing a common resource are executed sequentially and registers a cleanup task to release the file handle.

Returns

TypeDescription
nullNone