Merge pull request #4966 from blueyed/fix-preparse

config: fix consider_preparse with missing argument to -p
This commit is contained in:
Daniel Hahler
2019-03-21 19:12:57 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -481,7 +481,10 @@ class PytestPluginManager(PluginManager):
i += 1
if isinstance(opt, six.string_types):
if opt == "-p":
parg = args[i]
try:
parg = args[i]
except IndexError:
return
i += 1
elif opt.startswith("-p"):
parg = opt[2:]