From d2bb67bfdafcbadd39f9551a52635188f54954e0 Mon Sep 17 00:00:00 2001 From: Gleb Nikonorov Date: Sun, 7 Jun 2020 14:10:20 -0400 Subject: [PATCH] validate plugins before keys in config files --- src/_pytest/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 7d077d297..d55a5cdd7 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -1041,8 +1041,8 @@ class Config: self.known_args_namespace = ns = self._parser.parse_known_args( args, namespace=copy.copy(self.option) ) - self._validate_keys() self._validate_plugins() + self._validate_keys() if self.known_args_namespace.confcutdir is None and self.inifile: confcutdir = py.path.local(self.inifile).dirname self.known_args_namespace.confcutdir = confcutdir