From 3fe42bfd9d03f157eeccb72c6064dc549a59651e Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 15 Jul 2020 22:02:44 +0200 Subject: tests: Fix test_instance_method_property_observer (#108) The loop property was a poor choice here since setting it messes with libmpv's event loop, leading to property change observer events being dropped. --- mpv-test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mpv-test.py b/mpv-test.py index 7d97768..55c7cad 100755 --- a/mpv-test.py +++ b/mpv-test.py @@ -622,25 +622,25 @@ class RegressionTests(MpvTestCase): handler(*args, **kw) t = T() - m.loop = 'inf' + m.slang = 'ru' time.sleep(0.5) - m.observe_property('loop', t.t) + m.observe_property('slang', t.t) time.sleep(0.5) - m.loop = False + m.slang = 'jp' time.sleep(0.5) - m.loop = 'inf' + m.slang = 'ru' time.sleep(0.5) - m.unobserve_property('loop', t.t) + m.unobserve_property('slang', t.t) time.sleep(0.5) - m.loop = False - m.loop = 'inf' + m.slang = 'jp' + m.slang = 'ru' m.terminate() # needed for synchronization of event thread - handler.assert_has_calls([mock.call('loop', False), mock.call('loop', True)]) + handler.assert_has_calls([mock.call('slang', ['jp']), mock.call('slang', ['ru'])]) if __name__ == '__main__': -- cgit