'Return the collection node of a file.
This is like :py:meth:`getnode` but uses
:py:meth:`parseconfigure` to create the (configured) pytest
Config instance.
:param path: A :py:class:`py.path.local` instance of the file.'

def getpathnode(self, path):

    config = self.parseconfigure(path)
    session = Session(config)
    x = session.fspath.bestrelpath(path)
    config.hook.pytest_sessionstart(session=session)
    res = session.perform_collect([x], genitems=False)[0]
    config.hook.pytest_sessionfinish(session=session, exitstatus=EXIT_OK)
    return res
