get PYTEST_ADDOPTS before calling _initini
This commit is contained in:
parent
1480aed781
commit
66e9a79472
|
@ -1055,9 +1055,10 @@ class Config(object):
|
||||||
"(are you using python -O?)\n")
|
"(are you using python -O?)\n")
|
||||||
|
|
||||||
def _preparse(self, args, addopts=True):
|
def _preparse(self, args, addopts=True):
|
||||||
self._initini(args)
|
|
||||||
if addopts:
|
if addopts:
|
||||||
args[:] = shlex.split(os.environ.get('PYTEST_ADDOPTS', '')) + args
|
args[:] = shlex.split(os.environ.get('PYTEST_ADDOPTS', '')) + args
|
||||||
|
self._initini(args)
|
||||||
|
if addopts:
|
||||||
args[:] = self.getini("addopts") + args
|
args[:] = self.getini("addopts") + args
|
||||||
self._checkversion()
|
self._checkversion()
|
||||||
self._consider_importhook(args)
|
self._consider_importhook(args)
|
||||||
|
|
Loading…
Reference in New Issue