diff options
author | jaseg <git@jaseg.de> | 2024-08-25 13:45:13 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2024-08-25 13:45:13 +0200 |
commit | e6e9313af38dc4e6f650ac893b712eaa058b0b5a (patch) | |
tree | f67024b817ee868a44d4253a9d54f0d888b6f57e /tests | |
parent | 16cd0b338e50419713b2d7bd8fea956cb593c303 (diff) | |
download | python-mpv-e6e9313af38dc4e6f650ac893b712eaa058b0b5a.tar.gz python-mpv-e6e9313af38dc4e6f650ac893b712eaa058b0b5a.tar.bz2 python-mpv-e6e9313af38dc4e6f650ac893b712eaa058b0b5a.zip |
Tests: Fix race condition in test_wait_for_property_concurrencymain
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_mpv.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_mpv.py b/tests/test_mpv.py index a59ade1..9c42332 100755 --- a/tests/test_mpv.py +++ b/tests/test_mpv.py @@ -49,7 +49,8 @@ def timed_print(): start_time = time.time() def do_print(level, prefix, text): td = time.time() - start_time - print('{:.3f} [{}] {}: {}'.format(td, level, prefix, text), flush=True) + print('{:.3f} [{}] {}: {}'.format(td, level, prefix, text.strip()), flush=True) + return do_print class MpvTestCase(unittest.TestCase): @@ -922,11 +923,10 @@ class RegressionTests(MpvTestCase): def test_wait_for_property_concurrency(self): players = [mpv.MPV(vo=testvo, loglevel='debug', log_handler=timed_print()) for i in range(2)] - try: for _ in range(150): for player in players: - player.play('tests/test.webm') + player.loadfile('tests/test.webm', loop='inf') for player in players: player.wait_for_property('seekable') for player in players: |