Return a new pytest :class:`pytest.Config` instance from given commandline args. This invokes the pytest bootstrapping code in _pytest.config to create a new :py:class:`pytest.PytestPluginManager` and call the :hook:`pytest_cmdline_parse` hook to create a new :class:
(self, *args: str | os.PathLike[str])
| 1232 | return new_args |
| 1233 | |
| 1234 | def parseconfig(self, *args: str | os.PathLike[str]) -> Config: |
| 1235 | """Return a new pytest :class:`pytest.Config` instance from given |
| 1236 | commandline args. |
| 1237 | |
| 1238 | This invokes the pytest bootstrapping code in _pytest.config to create a |
| 1239 | new :py:class:`pytest.PytestPluginManager` and call the |
| 1240 | :hook:`pytest_cmdline_parse` hook to create a new :class:`pytest.Config` |
| 1241 | instance. |
| 1242 | |
| 1243 | If :attr:`plugins` has been populated they should be plugin modules |
| 1244 | to be registered with the plugin manager. |
| 1245 | """ |
| 1246 | import _pytest.config |
| 1247 | |
| 1248 | new_args = [str(x) for x in self._ensure_basetemp(args)] |
| 1249 | |
| 1250 | config = _pytest.config._prepareconfig(new_args, self.plugins) |
| 1251 | # we don't know what the test will do with this half-setup config |
| 1252 | # object and thus we make sure it gets unconfigured properly in any |
| 1253 | # case (otherwise capturing could still be active, for example) |
| 1254 | self._request.addfinalizer(config._ensure_unconfigure) |
| 1255 | return config |
| 1256 | |
| 1257 | def parseconfigure(self, *args: str | os.PathLike[str]) -> Config: |
| 1258 | """Return a new pytest configured Config instance. |
no test coverage detected