Don't fail a test if optional dependencies are not present
gio/tests/memory-monitor-dbus.py
needs the Python modules dbus, dbusmock, and gi to be installed. If these are not present the test fails, but ideally it should skip itself.
It's non-trivial to skip a test for a class that you can't even construct, so catch ImportError
and define a stub test case that simply skips.
WIP as I want to make sure the maintainers are happy with this approach. Still needs to cover the other test and have a better commit message.
Closes #2083 (closed).
Edited by Ross Burton