When to enable pytest-xdist and how to choose a distribution mode
Enable pytest-xdist only for isolated, deterministic tests. Compare serial, loadfile, loadscope and loads, weigh speed vs stability, and apply a conservative pytest.ini with function-scoped fixtures and validation steps.