From bee04a1eecf18c887a5fc676aa31f0bf0eec952c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Mar 2018 11:43:08 +0100 Subject: [PATCH] Wait until runner is finished in test_custom_env This seems to at least lead to less warnings when running the test. --- 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 cfbfa0a86..1e4aadbdd 100644 --- a/tests/unit/commands/test_userscripts.py +++ b/tests/unit/commands/test_userscripts.py @@ -97,10 +97,11 @@ def test_custom_env(qtbot, monkeypatch, py_proc, runner): f.write('\n') """) - with qtbot.waitSignal(runner.got_cmd, timeout=10000) as blocker: - runner.prepare_run(cmd, *args, env=env) - 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, env=env) + runner.store_html('') + runner.store_text('') data = blocker.args[0] ret_env = json.loads(data)