pytest-xdist icon indicating copy to clipboard operation
pytest-xdist copied to clipboard

pytest-xdist does not work with vscode test-explorer when using --dist=loadgroup

Open TylerGrantSmith opened this issue 1 year ago • 6 comments

I believe ultimately this is a consequence of the testcase name mangling that pytest-xdist does (adding @ to the testcase name).

I don't know if this should be considered a pytest-xdist issue or a vscode Python extension issue...

image

Even though it does run both tests image

TylerGrantSmith avatar Dec 20 '23 05:12 TylerGrantSmith

Xdist doesn't mangle test names

RonnyPfannschmidt avatar Dec 20 '23 07:12 RonnyPfannschmidt

It was just a guess as that is the only thing i can discern as different in thr report.

Is that not what happens here? https://github.com/pytest-dev/pytest-xdist/blob/a5848d11b872e1476c6db48f6094cd5085b3b339/src/xdist/remote.py#L195

TylerGrantSmith avatar Dec 20 '23 10:12 TylerGrantSmith

Based on this discussion re: hypothesis I assume this is something that the vscode group needs to address in their plugin. Thanks!

https://github.com/microsoft/vscode-python/issues/19790

TylerGrantSmith avatar Dec 20 '23 11:12 TylerGrantSmith

Yikes

@nicoddemus that breaks everything, unless we add a way that's not horrendously nuking the node id we should drop loadscope

RonnyPfannschmidt avatar Dec 21 '23 04:12 RonnyPfannschmidt