From 598eea14179cdea8751d56675afd0b4dcaa19dea Mon Sep 17 00:00:00 2001 From: PrerakPatelCS <62869089+PrerakPatelCS@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:23:46 -0500 Subject: [PATCH] Issue #10506 --- src/_pytest/config/findpaths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/config/findpaths.py b/src/_pytest/config/findpaths.py index 43c2367793e..807bcc2146b 100644 --- a/src/_pytest/config/findpaths.py +++ b/src/_pytest/config/findpaths.py @@ -203,7 +203,7 @@ def determine_setup( else: cwd = Path.cwd() rootdir = get_common_ancestor([cwd, ancestor]) - is_fs_root = os.path.splitdrive(str(rootdir))[1] == "/" + is_fs_root = os.path.splitdrive(str(rootdir))[1] == os.sep if is_fs_root: rootdir = ancestor if rootdir_cmd_arg: