diff options
author | jaseg <git@jaseg.de> | 2022-04-17 22:35:33 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-04-17 22:35:33 +0200 |
commit | b8cac81b369bbb0a22db6c1442c95a1a7dad5bc0 (patch) | |
tree | 7598bd7dd165fd0a9507e5e7c61446cc0201654e /tests/test_mpv.py | |
parent | 7459d3df049a696712273c298cf8a2742ae27a11 (diff) | |
download | python-mpv-b8cac81b369bbb0a22db6c1442c95a1a7dad5bc0.tar.gz python-mpv-b8cac81b369bbb0a22db6c1442c95a1a7dad5bc0.tar.bz2 python-mpv-b8cac81b369bbb0a22db6c1442c95a1a7dad5bc0.zip |
tests: Add wait_for_shutdown unit test
Diffstat (limited to 'tests/test_mpv.py')
-rwxr-xr-x | tests/test_mpv.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_mpv.py b/tests/test_mpv.py index b8c81aa..7c0373d 100755 --- a/tests/test_mpv.py +++ b/tests/test_mpv.py @@ -640,7 +640,18 @@ class TestLifecycle(unittest.TestCase): m.terminate() self.disp.stop() - @devnull_libmpv() + def test_wait_for_shutdown(self): + self.disp = Xvfb() + self.disp.start() + handler = mock.Mock() + m = mpv.MPV() + m.play(TESTVID) + with self.assertRaises(mpv.ShutdownError): + with m.prepare_and_wait_for_event(None) as result: + m.terminate() + result.result() + self.disp.stop() + def test_log_handler(self): handler = mock.Mock() self.disp = Xvfb() |