1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-12-21 12:38:13 +00:00

ignore uninitialized plugin tests when strict=false

This commit is contained in:
J. Fernando Sánchez 2023-09-26 19:55:41 +02:00
parent b33a70620b
commit e915766449

View File

@ -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):
'''