Wait until runner is finished in test_custom_env

This seems to at least lead to less warnings when running the test.
This commit is contained in:
Florian Bruhin 2018-03-19 11:43:08 +01:00
parent 39d25c1127
commit bee04a1eec

View File

@ -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)