config: set invocation_dir in the constructor already
This allows to make use of it when determining the rootdir etc.
This commit is contained in:
parent
a72eff5a08
commit
ed91d5f086
|
@ -609,6 +609,7 @@ class Config(object):
|
||||||
self._warn = self.pluginmanager._warn
|
self._warn = self.pluginmanager._warn
|
||||||
self.pluginmanager.register(self, "pytestconfig")
|
self.pluginmanager.register(self, "pytestconfig")
|
||||||
self._configured = False
|
self._configured = False
|
||||||
|
self.invocation_dir = py.path.local()
|
||||||
|
|
||||||
def do_setns(dic):
|
def do_setns(dic):
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -731,7 +732,6 @@ class Config(object):
|
||||||
self.rootdir, self.inifile, self.inicfg = r
|
self.rootdir, self.inifile, self.inicfg = r
|
||||||
self._parser.extra_info["rootdir"] = self.rootdir
|
self._parser.extra_info["rootdir"] = self.rootdir
|
||||||
self._parser.extra_info["inifile"] = self.inifile
|
self._parser.extra_info["inifile"] = self.inifile
|
||||||
self.invocation_dir = py.path.local()
|
|
||||||
self._parser.addini("addopts", "extra command line options", "args")
|
self._parser.addini("addopts", "extra command line options", "args")
|
||||||
self._parser.addini("minversion", "minimally required pytest version")
|
self._parser.addini("minversion", "minimally required pytest version")
|
||||||
self._override_ini = ns.override_ini or ()
|
self._override_ini = ns.override_ini or ()
|
||||||
|
|
Loading…
Reference in New Issue