mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +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:
|
if do_raise:
|
||||||
# do a straight raise if we are playing with enviroment variables at execution time, ignore the broken sample
|
# 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):
|
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))
|
raise IntegrationPluginError(package_name, str(error))
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ class PluginsRegistry:
|
|||||||
if not settings.PLUGIN_TESTING:
|
if not settings.PLUGIN_TESTING:
|
||||||
raise error # pragma: no cover
|
raise error # pragma: no cover
|
||||||
plugin_db_setting = None
|
plugin_db_setting = None
|
||||||
except (IntegrityError) as error:
|
except (IntegrityError) as error: # pragma: no cover
|
||||||
logger.error(f"Error initializing plugin: {error}")
|
logger.error(f"Error initializing plugin: {error}")
|
||||||
|
|
||||||
# Always activate if testing
|
# Always activate if testing
|
||||||
@ -322,7 +322,7 @@ class PluginsRegistry:
|
|||||||
self.plugins[plugin.slug] = plugin
|
self.plugins[plugin.slug] = plugin
|
||||||
else:
|
else:
|
||||||
# save for later reference
|
# 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):
|
def _activate_plugins(self, force_reload=False):
|
||||||
"""
|
"""
|
||||||
@ -411,7 +411,7 @@ class PluginsRegistry:
|
|||||||
deleted_count += 1
|
deleted_count += 1
|
||||||
|
|
||||||
if deleted_count > 0:
|
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):
|
except (ProgrammingError, OperationalError):
|
||||||
# Database might not yet be ready
|
# Database might not yet be ready
|
||||||
logger.warning("activate_integration_schedule failed, database not ready")
|
logger.warning("activate_integration_schedule failed, database not ready")
|
||||||
|
@ -78,7 +78,7 @@ class ScheduledTaskPluginTests(TestCase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
pass
|
pass # pragma: no cover
|
||||||
|
|
||||||
with self.assertRaises(MixinImplementationError):
|
with self.assertRaises(MixinImplementationError):
|
||||||
WrongFuncSchedules()
|
WrongFuncSchedules()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user