From 4ea7bbc197de2af0938ff64423add33098ee7326 Mon Sep 17 00:00:00 2001 From: Roland Puntaier Date: Tue, 28 Nov 2017 16:47:12 +0100 Subject: [PATCH] fix issue #2920 --- _pytest/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/config.py b/_pytest/config.py index 1ae1ffd09..499c8079d 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -417,7 +417,7 @@ class PytestPluginManager(PluginManager): # _pytest prefix. assert isinstance(modname, (six.text_type, str)), "module name as text required, got %r" % modname modname = str(modname) - if self.get_plugin(modname) is not None: + if self.is_blocked(modname) or self.get_plugin(modname) is not None: return if modname in builtin_plugins: importspec = "_pytest." + modname