Open criemen opened 2 months ago
Node id modification needs to be dropped all together
That is a good point - as all the unit tests fail on this PR anyways, I'll see what I can do.
Doing the stuff the hack with node id enabled in a more natural way is a major undertaking
Only got there as a follow-up
I'll collect feedback on https://github.com/pytest-dev/pytest-xdist/pull/1119 and if that's not a viable route, I'll try to resurrect this PR instead.
We force test collection on the controller node, as we run some global setup there before starting the workers. That setup also depends on the test node IDs, but currently, pytest-xdist only modifies the test node IDs on the workers, that've been started and where
setup_config
has been called. I don't see a good reason for this, and for creating a separate config entry, so let's just check the right condition in the pytest hook. That way, the hook will always do the same node ID transformation, regardless of pytest-xdist setup.Thanks for submitting a PR, your contribution is really appreciated!
Here's a quick checklist that should be present in PRs:
[ ] Make sure to include reasonable tests for your change if necessary
[ ] We use towncrier for changelog management, so please add a news file into the
changelog
folder following these guidelines:$issue_id.$type
for example588.bugfix
;removal
,feature
,bugfix
,vendor
,doc
ortrivial