summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2019-07-18 11:00:50 +0200
committerFlorian Bruhin <me@the-compiler.org>2019-07-18 11:00:50 +0200
commit91a5e0d09861f842eb40b58d27305bd8c9f1fa4d (patch)
tree96edbbc2d1448a8a100f7d28ddf9125cf2cb846f
parent876290340ad3ae4e9e3dc3e2434be293c4ffd323 (diff)
downloadqutebrowser-91a5e0d09861f842eb40b58d27305bd8c9f1fa4d.tar.gz
qutebrowser-91a5e0d09861f842eb40b58d27305bd8c9f1fa4d.zip
tests: Wait until userscript runner finished
Otherwise, temporary files and processes get cleaned up after the test is finished, leading to warning messages.
-rw-r--r--tests/unit/commands/test_userscripts.py9
1 files 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']