Skip to content

Commit 01b53cd

Browse files
committed
fixup! squash! squash! Make more use of get_dirs_from_args
1 parent 7443261 commit 01b53cd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

_pytest/config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,12 @@ def determine_setup(inifile, args):
11471147
if rootdir is None:
11481148
cwd = py.path.local()
11491149
rootdir = get_common_ancestor([cwd, ancestor])
1150-
if rootdir.dirname == '' or rootdir.dirname == rootdir:
1150+
1151+
def is_at_root(d):
1152+
import os
1153+
return os.path.splitdrive(d) == os.sep
1154+
1155+
if is_at_root(rootdir):
11511156
rootdir = ancestor
11521157
return rootdir, inifile, inicfg or {}
11531158

0 commit comments

Comments
 (0)