'Return a new pytest configured Config instance.
This returns a new :py:class:`_pytest.config.Config` instance
like :py:meth:`parseconfig`, but also calls the
pytest_configure hook.'

def parseconfigure(self, *args):

    config = self.parseconfig(*args)
    config._do_configure()
    self.request.addfinalizer(config._ensure_unconfigure)
    return config
