Skip to content

Commit f56fd50

Browse files
committed
Fixed #2149 - parse directory names properly when args contains ::.
1 parent 187b971 commit f56fd50

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

_pytest/config.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,9 +1257,13 @@ def get_common_ancestor(args):
12571257

12581258

12591259
def get_dirs_from_args(args):
1260-
return [d for d in (py.path.local(x) for x in args
1261-
if not str(x).startswith("-"))
1262-
if d.exists()]
1260+
possible_dirs = [
1261+
py.path.local(str(arg).split('::')[0])
1262+
for arg in args
1263+
if not str(arg).startswith('-')
1264+
]
1265+
1266+
return [d for d in possible_dirs if d.exists()]
12631267

12641268

12651269
def determine_setup(inifile, args, warnfunc=None):

0 commit comments

Comments
 (0)