(install) tests already try to initialize SecretService/Dbus keyring (DBusException, failing)
I am maintaining the Python 3 version of the Arch Linux package of python-keyring: https://aur.archlinux.org/packages/python-keyring/
The packaging runs nosetest3 in the "check()" part. When having python-secretstorage installed, that part is also tested and fails on the building user (different from the user running the X session) with:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
When running the same with the user that created the current X session it opens a Window asking to set a password for a new keyring.
Either that shouldn't happen or python-keyring doesn't have any (usable) install-time/packaging tests. With install-time/packaging tests I mean what is done with "make check" in autotools and it should be non-interactive and self-contained (as in: doesn't fiddle with configurations and such).