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):
|
||||
self._initini(args)
|
||||
if addopts:
|
||||
env_addopts = os.environ.get('PYTEST_ADDOPTS', '')
|
||||
args[:] = env_addopts.replace('"', '').split() + args
|
||||
args[:] = shlex.split(os.environ.get('PYTEST_ADDOPTS', '')) + args
|
||||
args[:] = self.getini("addopts") + args
|
||||
self._checkversion()
|
||||
self.pluginmanager.consider_preparse(args)
|
||||
|
|
Loading…
Reference in New Issue