From 9f9e41687f1323a23865eea9b2fb9b07d7317789 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 11 Jul 2016 20:47:37 +0200 Subject: [PATCH] Add a (tmpdir) replacement for BDD tests See #1639 --- tests/end2end/features/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index 9d1d5c074..8c9eea825 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -179,7 +179,7 @@ def set_setting(quteproc, httpbin, sect, opt, value): @bdd.when(bdd.parsers.parse("I run {command}")) -def run_command(quteproc, httpbin, command): +def run_command(quteproc, httpbin, tmpdir, command): """Run a qutebrowser command. The suffix "with count ..." can be used to pass a count to the command. @@ -199,6 +199,7 @@ def run_command(quteproc, httpbin, command): command = command.replace('(port)', str(httpbin.port)) command = command.replace('(testdata)', utils.abs_datapath()) + command = command.replace('(tmpdir)', str(tmpdir)) quteproc.send_cmd(command, count=count, invalid=invalid)