-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(linux): Fix detection of unit tests #9606
Conversation
When running on Ubuntu 20.04 Focal, one of the Python dependencies loads the `unittest` module so that running `km-config` output the message that Sentry would be disabled because unit tests are running. This change now uses the callstack to check if we're running unit tests. Fixes #9577.
User Test ResultsTest specification and instructions
Test Artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels a little squirmy (especially given the slow case for the search is the production case), and I wonder how often is_sentry_enabled
is called. Should we be caching the result; is traceback.format_stack()
expensive?
But I guess LGTM otherwise 😁
It gets called at the startup of |
Changes in this pull request will be available for download in Keyman version 17.0.180-alpha |
When running on Ubuntu 20.04 Focal, one of the Python dependencies loads the
unittest
module so that runningkm-config
output the message that Sentry would be disabled because unit tests are running.This change now uses the call stack to check if we're running unit tests.
Fixes #9577.
User Testing
TEST_VERIFY: start
km-config
from the command line and verify that no output is shown