sphinx
sphinx copied to clipboard
[tests] add logic for testing ``sphinx.testing.fixtures`` [part 3]
This follows #12093.
This adds the tests for testing our plugin implementation.
Due to xdist implementation, the collection of test items does not happen on the controller node but only at the level of the worker nodes and each worker node executes the same protocol.
Now, if a test is parametrized, it is obvious that we want the tests to be executed by the same worker, hence the needs of xdist_group. Unfortunately, you cannot specify the group at the moment a fixture is requested since it will already be too late. Thus, if no explicit group is given, we automatically add a group to parametrized tests based on the location of the "base" node.
Note that this feature only affects our internal tests, so downstream repos using the plugin are not affected and should do their own trick for xdist (they can use the same approach or do whatever they need manually).