Re-nerf property observer tests

This commit is contained in:
jaseg 2017-08-06 21:32:17 +02:00
parent 96e8ca390a
commit cc84e4939b

View file

@ -223,25 +223,23 @@ class ObservePropertyTest(MpvTestCase):
any_order=True) any_order=True)
handler.reset_mock() handler.reset_mock()
# FIXME the upstream observer API is extremely unreliable ATM. m.mute = True
m.loop = 'inf'
self.assertEqual(m.mute, True)
self.assertEqual(m.loop, 'inf')
#m.mute = True time.sleep(0.05)
#m.loop = 'inf' foo.unobserve_mpv_properties()
#self.assertEqual(m.mute, True)
#self.assertEqual(m.loop, 'inf')
#time.sleep(0.5) m.mute = False
#foo.unobserve_mpv_properties() m.loop = False
m.mute = True
#m.mute = False m.loop = 'inf'
#m.loop = False m.terminate() # needed for synchronization of event thread
#m.mute = True handler.assert_has_calls([
#m.loop = 'inf' mock.call('mute', True),
#m.terminate() # needed for synchronization of event thread mock.call('loop', 'inf')],
#handler.assert_has_calls([ any_order=True)
# mock.call('mute', True),
# mock.call('loop', 'inf')],
# any_order=True)
class TestLifecycle(unittest.TestCase): class TestLifecycle(unittest.TestCase):
def test_create_destroy(self): def test_create_destroy(self):
@ -349,8 +347,7 @@ class RegressionTests(MpvTestCase):
m.loop = False m.loop = False
m.loop = 'inf' m.loop = 'inf'
m.terminate() # needed for synchronization of event thread m.terminate() # needed for synchronization of event thread
# FIXME the upstream observer API is extremely unreliable ATM. handler.assert_has_calls([mock.call('loop', False), mock.call('loop', 'inf')])
#handler.assert_has_calls([mock.call('loop', False), mock.call('loop', 'inf')])
if __name__ == '__main__': if __name__ == '__main__':