Skip to content

Conversation

@graingert
Copy link
Member

@graingert graingert commented Aug 16, 2020

Fixes #860

skip_if_no_django()

xdist_suffix = getattr(request.config, "slaveinput", {}).get("slaveid")
xdist_suffix = getattr(request.config, "workerinput", {}).get("workerid")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't followed the slave/worker work, but is it safe to just switch, or should we keep compatibility with the old names for a while? I.e. like this:

Suggested change
xdist_suffix = getattr(request.config, "workerinput", {}).get("workerid")
workerinput = getattr(request.config, "workerinput", getattr(request.config, "slaveinput", {}))
xdist_suffix = workerinput.get("workerid", workerinput.get("slaveid"))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest-cov switched wholesale, so I think pytest-django should too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, looks like it should be fine from the graph provided in pytest-dev/pytest-cov#412 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

duplicate key value violates unique constraint "pg_extension_name_index" after update pytest-xdist to 2.0.0

4 participants