The Signals enum was added in Python 3.5. If it is not present we
need to iterate over the dictionary items, looking for signal name
to number mappings. Fixes the signal tests with Python 3.4.
It is a bit more code, but it is more "pythonic" and easier to debug
as the enum values also know their names.
It is also an API break, eg. sudo.RC_OK becomes sudo.RC.OK as sudo.RC will
be the "type" of the enum, but I guess that is acceptable before the
initial release.
They are platform dependant, so their test would fail on some platforms.
While we could create separate plugin for the tests, I like the idea that
the examples are ensured to be working.
I believe this is a good compromise for being able to auto update the
test cases.