diff --git a/senpy/plugins/__init__.py b/senpy/plugins/__init__.py index d78c97a..42307b4 100644 --- a/senpy/plugins/__init__.py +++ b/senpy/plugins/__init__.py @@ -311,10 +311,18 @@ class FailedPlugin(Plugin): a = info.get('name', info.get('module', self.name)) self['name'] == a self._function = function + self.is_activated = False def retry(self): return self._function() + def test(self): + ''' + A module that failed to load cannot be tested. But non-optional + plugins should not fail to load in strict mode. + ''' + assert self.optional and not config.strict + class Analyser(Plugin): '''