Improve test_attribute_proxy test robustness
Two tests should be less flaky now:
test_attribute_proxy.py::test_eventtest_attribute_proxy.py::test_attribute_poll
For test_event, we keep reading device state while waiting for the events (in asyncio and gevent green modes). This gives the callback a chance to be executed by the event loop.
For test_attribute_poll, we can't rely on accurate timing as the CI runners have quite low resource allocation. We often
see the polling history has the same value twice, so exact comparison of read and written values fails.
We make this check more forgiving, and read back the full polling history. It must only include the expected values, and must move through them in the order they were written. We can even miss some of the readings.
Edited by Anton Joubert