fix conftest detection if commandline arguments contain "::" syntax

--HG--
branch : fix_initial_parsing
This commit is contained in:
holger krekel
2014-07-28 11:48:37 +02:00
parent ba878c6d9d
commit 5ccd3f2fc5
3 changed files with 26 additions and 0 deletions

View File

@@ -485,6 +485,11 @@ class Conftest(object):
testpaths = namespace.file_or_dir
foundanchor = False
for path in testpaths:
path = str(path)
# remove node-id syntax
i = path.find("::")
if i != -1:
path = path[:i]
anchor = current.join(path, abs=1)
if exists(anchor): # we found some file object
self._try_load_conftest(anchor)