Use shlex to split the arguments from PYTEST_ADDOPTS.
--HG-- branch : env-addopts
This commit is contained in:
parent
7325a5fe2e
commit
8f12269db7
|
@ -705,8 +705,7 @@ class Config(object):
|
||||||
def _preparse(self, args, addopts=True):
|
def _preparse(self, args, addopts=True):
|
||||||
self._initini(args)
|
self._initini(args)
|
||||||
if addopts:
|
if addopts:
|
||||||
env_addopts = os.environ.get('PYTEST_ADDOPTS', '')
|
args[:] = shlex.split(os.environ.get('PYTEST_ADDOPTS', '')) + args
|
||||||
args[:] = env_addopts.replace('"', '').split() + args
|
|
||||||
args[:] = self.getini("addopts") + args
|
args[:] = self.getini("addopts") + args
|
||||||
self._checkversion()
|
self._checkversion()
|
||||||
self.pluginmanager.consider_preparse(args)
|
self.pluginmanager.consider_preparse(args)
|
||||||
|
|
Loading…
Reference in New Issue