Skip to main content

partition_suite_by_case

Partition a test suite by TestCase, preserving the order of tests.

def partition_suite_by_case(
suite: unittest.TestSuite
) - > list

Partition a test suite by TestCase, preserving the order of tests.

Parameters

NameTypeDescription
suiteunittest.TestSuiteThe original test suite containing various test cases to be grouped by their class type.

Returns

TypeDescription
listA list of new suite instances, each containing a group of tests belonging to the same TestCase class.