From 91a5e0d09861f842eb40b58d27305bd8c9f1fa4d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 18 Jul 2019 11:00:50 +0200 Subject: tests: Wait until userscript runner finished Otherwise, temporary files and processes get cleaned up after the test is finished, leading to warning messages. --- tests/unit/commands/test_userscripts.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit/commands/test_userscripts.py b/tests/unit/commands/test_userscripts.py index 280450b68..8a14847d6 100644 --- a/tests/unit/commands/test_userscripts.py +++ b/tests/unit/commands/test_userscripts.py @@ -74,10 +74,11 @@ def test_command(qtbot, py_proc, runner): with open(os.environ['QUTE_FIFO'], 'w') as f: f.write('foo\n') """) - with qtbot.waitSignal(runner.got_cmd, timeout=10000) as blocker: - runner.prepare_run(cmd, *args) - runner.store_html('') - runner.store_text('') + with qtbot.waitSignal(runner.finished, timeout=10000): + with qtbot.waitSignal(runner.got_cmd, timeout=10000) as blocker: + runner.prepare_run(cmd, *args) + runner.store_html('') + runner.store_text('') assert blocker.args == ['foo'] -- cgit v1.2.3-54-g00ecf