Use config_invocation_dir for startdirs (#5151)

Use config_invocation_dir for startdirs
This commit is contained in:
Bruno Oliveira 2019-04-29 18:14:51 -03:00 committed by GitHub
commit 3f5622c577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -435,7 +435,7 @@ class Session(nodes.FSCollector):
self.shouldfail = False
self.trace = config.trace.root.get("collection")
self._norecursepatterns = config.getini("norecursedirs")
self.startdir = py.path.local()
self.startdir = config.invocation_dir
self._initialpaths = frozenset()
# Keep track of any collected nodes in here, so we don't duplicate fixtures
self._node_cache = {}

View File

@ -234,7 +234,7 @@ class TerminalReporter(object):
self._showfspath = None
self.stats = {}
self.startdir = py.path.local()
self.startdir = config.invocation_dir
if file is None:
file = sys.stdout
self._tw = _pytest.config.create_terminal_writer(config, file)