ignore for coverage

This commit is contained in:
Matthias 2022-05-04 00:43:49 +02:00
parent 6504ef535a
commit 8038cff874
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093
3 changed files with 5 additions and 5 deletions

View File

@ -88,7 +88,7 @@ def handle_error(error, do_raise: bool = True, do_log: bool = True, log_name: st
if do_raise:
# do a straight raise if we are playing with enviroment variables at execution time, ignore the broken sample
if settings.TESTING_ENV and package_name != 'integration.broken_sample' and isinstance(error, IntegrityError):
raise error
raise error # pragma: no cover
raise IntegrationPluginError(package_name, str(error))
# endregion

View File

@ -283,7 +283,7 @@ class PluginsRegistry:
if not settings.PLUGIN_TESTING:
raise error # pragma: no cover
plugin_db_setting = None
except (IntegrityError) as error:
except (IntegrityError) as error: # pragma: no cover
logger.error(f"Error initializing plugin: {error}")
# Always activate if testing
@ -322,7 +322,7 @@ class PluginsRegistry:
self.plugins[plugin.slug] = plugin
else:
# save for later reference
self.plugins_inactive[plug_key] = plugin_db_setting
self.plugins_inactive[plug_key] = plugin_db_setting # pragma: no cover
def _activate_plugins(self, force_reload=False):
"""
@ -411,7 +411,7 @@ class PluginsRegistry:
deleted_count += 1
if deleted_count > 0:
logger.info(f"Removed {deleted_count} old scheduled tasks")
logger.info(f"Removed {deleted_count} old scheduled tasks") # pragma: no cover
except (ProgrammingError, OperationalError):
# Database might not yet be ready
logger.warning("activate_integration_schedule failed, database not ready")

View File

@ -78,7 +78,7 @@ class ScheduledTaskPluginTests(TestCase):
}
def test(self):
pass
pass # pragma: no cover
with self.assertRaises(MixinImplementationError):
WrongFuncSchedules()