diff options
author | jaseg <code@jaseg.net> | 2020-07-15 22:02:44 +0200 |
---|---|---|
committer | jaseg <code@jaseg.net> | 2020-07-15 22:04:03 +0200 |
commit | 3fe42bfd9d03f157eeccb72c6064dc549a59651e (patch) | |
tree | e643e6dc22e5607981c8a4476ca9203be15594b4 /mpv-test.py | |
parent | f5a9690739a8c81a19602b3b151d74dec0cbbcf5 (diff) | |
download | python-mpv-3fe42bfd9d03f157eeccb72c6064dc549a59651e.tar.gz python-mpv-3fe42bfd9d03f157eeccb72c6064dc549a59651e.tar.bz2 python-mpv-3fe42bfd9d03f157eeccb72c6064dc549a59651e.zip |
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.
Diffstat (limited to 'mpv-test.py')
-rwxr-xr-x | mpv-test.py | 16 |
1 files 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__': |