You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running unit tests, with IOpipe integrated, the unit tests fail in a non-graceful fashion if the context object is not right. IOpipe should not fail in these mock unit tests, but instead should gracefully print a warning message.
IOpipe should not break unit tests as their code should not need to know about IOpipes context requirements
It should handle it similarly to how it handles no token exceptions:
#if env var IOPIPE_ENABLED is set to False skip reporting
if self.config["enabled"] is False:
logger.debug("IOpipe agent disabled, skipping reporting")
return func(event, context)
# If a token is not present, skip reporting
if not self.config["token"]:
warnings.warn(
"Your function is decorated with iopipe, but a valid token was not found. "
"Set the IOPIPE_TOKEN environment variable with your IOpipe project token."
)
return func(event, context)
The text was updated successfully, but these errors were encountered:
Description
When running unit tests, with IOpipe integrated, the unit tests fail in a non-graceful fashion if the context object is not right. IOpipe should not fail in these mock unit tests, but instead should gracefully print a warning message.
IOpipe should not break unit tests as their code should not need to know about IOpipes context requirements
It should handle it similarly to how it handles no token exceptions:
#if env var IOPIPE_ENABLED is set to False skip reporting
if self.config["enabled"] is False:
logger.debug("IOpipe agent disabled, skipping reporting")
return func(event, context)
The text was updated successfully, but these errors were encountered: