Skip to content

Commit e4a1e6f

Browse files
author
Vitaly Kruglikov
committed
Fix node_path.relative_to(...) in _DistributedSetupCoordinatorImpl.maybe_call_setup to work correctly on Windows.
1 parent de68bbd commit e4a1e6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xdist/iso_scheduling_plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ def maybe_call_setup(
290290
self._setup_context is None
291291
), f"maybe_call_setup()` already called {self._setup_context=}"
292292

293-
node_path = self._setup_request.node.path
293+
node_path: pathlib.Path = self._setup_request.node.path
294294

295295
root_context_dir: pathlib.Path = (
296296
self._root_context_base_dir
297-
/ node_path.relative_to(node_path.root)
297+
/ node_path.relative_to(node_path.parts[0])
298298
/ self._setup_request.node.name
299299
)
300300

0 commit comments

Comments
 (0)