FSCollector: keep/use given fspath

Via https://github.com/blueyed/pytest/pull/42.
This commit is contained in:
Daniel Hahler 2019-11-02 10:01:27 +01:00
parent 7f851a215b
commit 0c7c26fe6e
1 changed files with 3 additions and 2 deletions

View File

@ -364,8 +364,9 @@ def _check_initialpaths_for_relpath(session, fspath):
class FSCollector(Collector):
def __init__(self, fspath, parent=None, config=None, session=None, nodeid=None):
fspath = py.path.local(fspath) # xxx only for test_resultlog.py?
def __init__(
self, fspath: py.path.local, parent=None, config=None, session=None, nodeid=None
) -> None:
name = fspath.basename
if parent is not None:
rel = fspath.relto(parent.fspath)