Skip to content

Commit

Permalink
get PYTEST_ADDOPTS before calling _initini
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas authored and ceridwen committed Oct 19, 2017
1 parent a2933e9 commit 52e904e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _pytest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,10 @@ def _warn_about_missing_assertion(self, mode):
"(are you using python -O?)\n")

def _preparse(self, args, addopts=True):
self._initini(args)
if addopts:
args[:] = shlex.split(os.environ.get('PYTEST_ADDOPTS', '')) + args
self._initini(args)
if addopts:
args[:] = self.getini("addopts") + args
self._checkversion()
self._consider_importhook(args)
Expand Down

0 comments on commit 52e904e

Please sign in to comment.