File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change
1
+ The current directory is no longer added ``sys.path `` on workers.
2
+
3
+ This behavior is surprising because it makes xdist runs and non-xdist runs to potentially behave differently.
Original file line number Diff line number Diff line change @@ -251,17 +251,12 @@ def remote_initconfig(option_dict, args):
251
251
252
252
253
253
if __name__ == "__channelexec__" :
254
+ import py
255
+
254
256
channel = channel # noqa
255
257
workerinput , args , option_dict = channel .receive ()
256
- importpath = os .getcwd ()
257
- sys .path .insert (0 , importpath ) # XXX only for remote situations
258
- os .environ ["PYTHONPATH" ] = (
259
- importpath + os .pathsep + os .environ .get ("PYTHONPATH" , "" )
260
- )
261
258
os .environ ["PYTEST_XDIST_WORKER" ] = workerinput ["workerid" ]
262
259
os .environ ["PYTEST_XDIST_WORKER_COUNT" ] = str (workerinput ["workercount" ])
263
- # os.environ['PYTHONPATH'] = importpath
264
- import py
265
260
266
261
config = remote_initconfig (option_dict , args )
267
262
config ._parser .prog = os .path .basename (workerinput ["mainargv" ][0 ])
You can’t perform that action at this time.
0 commit comments