Use config_invocation_dir for startdirs
`Session.startdir` and `TerminalReporter.startdir` appear to be redundant given `Config.invocation_dir`. Keep them for backward compatibility reasons, but use `config.invocation_dir` for them.
This commit is contained in:
		
							parent
							
								
									1460ad6027
								
							
						
					
					
						commit
						0bf363472e
					
				|  | @ -434,7 +434,7 @@ class Session(nodes.FSCollector): | ||||||
|         self.shouldfail = False |         self.shouldfail = False | ||||||
|         self.trace = config.trace.root.get("collection") |         self.trace = config.trace.root.get("collection") | ||||||
|         self._norecursepatterns = config.getini("norecursedirs") |         self._norecursepatterns = config.getini("norecursedirs") | ||||||
|         self.startdir = py.path.local() |         self.startdir = config.invocation_dir | ||||||
|         self._initialpaths = frozenset() |         self._initialpaths = frozenset() | ||||||
|         # Keep track of any collected nodes in here, so we don't duplicate fixtures |         # Keep track of any collected nodes in here, so we don't duplicate fixtures | ||||||
|         self._node_cache = {} |         self._node_cache = {} | ||||||
|  |  | ||||||
|  | @ -234,7 +234,7 @@ class TerminalReporter(object): | ||||||
|         self._showfspath = None |         self._showfspath = None | ||||||
| 
 | 
 | ||||||
|         self.stats = {} |         self.stats = {} | ||||||
|         self.startdir = py.path.local() |         self.startdir = config.invocation_dir | ||||||
|         if file is None: |         if file is None: | ||||||
|             file = sys.stdout |             file = sys.stdout | ||||||
|         self._tw = _pytest.config.create_terminal_writer(config, file) |         self._tw = _pytest.config.create_terminal_writer(config, file) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue