Skip to content

Commit

Permalink
Use config_invocation_dir for startdirs (#5151)
Browse files Browse the repository at this point in the history
Use config_invocation_dir for startdirs
  • Loading branch information
nicoddemus committed Apr 29, 2019
2 parents 1fb3f63 + 0bf3634 commit 3f5622c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def __init__(self, config):
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 = {}
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(self, config, file=None):
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)
Expand Down

0 comments on commit 3f5622c

Please sign in to comment.