-
Notifications
You must be signed in to change notification settings - Fork 13
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
Failing to import from wakepy when running test with tox (KeyError: 'DBUS_SESSION_BUS_ADDRESS') #26
Comments
I checked the environment variables with my current terminal (myenv) and inside the tox pytest process (testenv). These are the common environment variables:
These are the environment variables specific to the test environment:
The test environment is really missing the environment variable
|
Wakepy 0.6.0 uses by default the Inhibit/Uninhibit methods of the org.freedesktop.Screensaver interface of the session D-Bus. Reading at Well-known Message Bus Instances from D-Bus Specification:
When using a breakpoint inside the test (tox+pytest), I can see that the dbus is running:
but there is no
|
This can be fixed with adding
This way tox will pass the environment variable |
The reason for the exception is now clear. User should always pass the
I'm also considering if there should be some automation trying to get the |
Setup:
What happens?
When calling
user will get:
Steps to reproduce
tox.ini
with following contentsset_keepawake
:The text was updated successfully, but these errors were encountered: