mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
ignore for coverage
This commit is contained in:
parent
6504ef535a
commit
8038cff874
@ -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
|
||||
|
||||
|
@ -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")
|
||||
|
@ -78,7 +78,7 @@ class ScheduledTaskPluginTests(TestCase):
|
||||
}
|
||||
|
||||
def test(self):
|
||||
pass
|
||||
pass # pragma: no cover
|
||||
|
||||
with self.assertRaises(MixinImplementationError):
|
||||
WrongFuncSchedules()
|
||||
|
Loading…
Reference in New Issue
Block a user