From 77508273de0cff5ce8bf779bc046023fc1b7ed8d Mon Sep 17 00:00:00 2001 From: Andrey Pokhilko Date: Thu, 15 Aug 2019 13:07:52 +0300 Subject: [PATCH] Fix test better? --- tests/test_peripherals.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_peripherals.py b/tests/test_peripherals.py index b196d9d..60fba02 100644 --- a/tests/test_peripherals.py +++ b/tests/test_peripherals.py @@ -21,10 +21,11 @@ class PeripheralsTest(unittest.TestCase): def callback(pressed): vals.append(pressed) - hub.connection.notification_delayed("060001020600", 0.1) + hub.connection.notification_delayed("060001020600", 0.0) button.subscribe(callback) time.sleep(0.1) + hub.connection.notification_delayed("060001020600", 0.1) hub.connection.notification_delayed("060001020601", 0.2) hub.connection.notification_delayed("060001020600", 0.3) time.sleep(0.4) @@ -33,7 +34,7 @@ class PeripheralsTest(unittest.TestCase): time.sleep(0.1) hub.connection.wait_notifications_handled() - self.assertEqual([1, 0], vals) + self.assertEqual([0, 1, 0], vals) self.assertEqual(b"0500010202", hub.writes[1][1]) self.assertEqual(b"0500010203", hub.writes[2][1])