Return a new pytest Config instance from given commandline args. This invokes the pytest bootstrapping code in _pytest.config to create a new :py:class:`_pytest.core.PluginManager` and call the pytest_cmdline_parse hook to create a new :py:class:`pytest.Config` insta
(self, *args: Union[str, "os.PathLike[str]"])
| 1190 | return new_args |
| 1191 | |
| 1192 | def parseconfig(self, *args: Union[str, "os.PathLike[str]"]) -> Config: |
| 1193 | """Return a new pytest Config instance from given commandline args. |
| 1194 | |
| 1195 | This invokes the pytest bootstrapping code in _pytest.config to create |
| 1196 | a new :py:class:`_pytest.core.PluginManager` and call the |
| 1197 | pytest_cmdline_parse hook to create a new |
| 1198 | :py:class:`pytest.Config` instance. |
| 1199 | |
| 1200 | If :py:attr:`plugins` has been populated they should be plugin modules |
| 1201 | to be registered with the PluginManager. |
| 1202 | """ |
| 1203 | import _pytest.config |
| 1204 | |
| 1205 | new_args = self._ensure_basetemp(args) |
| 1206 | new_args = [str(x) for x in new_args] |
| 1207 | |
| 1208 | config = _pytest.config._prepareconfig(new_args, self.plugins) # type: ignore[arg-type] |
| 1209 | # we don't know what the test will do with this half-setup config |
| 1210 | # object and thus we make sure it gets unconfigured properly in any |
| 1211 | # case (otherwise capturing could still be active, for example) |
| 1212 | self._request.addfinalizer(config._ensure_unconfigure) |
| 1213 | return config |
| 1214 | |
| 1215 | def parseconfigure(self, *args: Union[str, "os.PathLike[str]"]) -> Config: |
| 1216 | """Return a new pytest configured Config instance. |
no test coverage detected