Skip to content

Commit 194fe04

Browse files
committed
config: replace post-parse usage of known_args_namespace with option
After parse, we should use the final `option` Namespace.
1 parent 5eaad82 commit 194fe04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_pytest/config/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,12 +1539,12 @@ def parse(self, args: list[str], addopts: bool = True) -> None:
15391539
self._preparse(args, addopts=addopts)
15401540
self._parser.after_preparse = True # type: ignore
15411541
try:
1542-
parsed = self._parser.parse(args, namespace=self.option)
1542+
self._parser.parse(args, namespace=self.option)
15431543
except PrintHelp:
15441544
return
15451545
self.args, self.args_source = self._decide_args(
1546-
args=getattr(parsed, FILE_OR_DIR),
1547-
pyargs=self.known_args_namespace.pyargs,
1546+
args=getattr(self.option, FILE_OR_DIR),
1547+
pyargs=self.option.pyargs,
15481548
testpaths=self.getini("testpaths"),
15491549
invocation_dir=self.invocation_params.dir,
15501550
rootpath=self.rootpath,

0 commit comments

Comments
 (0)