shuffle_tests
Return an iterator over the given tests in a shuffled order, keeping tests next to other tests of their class.
def shuffle_tests(
tests: iterable,
shuffler: object
) - > iterator
Return an iterator over the given tests in a shuffled order, keeping tests next to other tests of their class.
Parameters
| Name | Type | Description |
|---|---|---|
| tests | iterable | An iterable of test cases to be reorganized |
| shuffler | object | An object responsible for performing the shuffle logic, expected to have a shuffle method that accepts a key function |
Returns
| Type | Description |
|---|---|
iterator | An iterator that yields tests in a randomized order while maintaining class-level grouping |