bdd: Add step to start a fresh instance.
This commit is contained in:
parent
6e7d6fb00e
commit
f440953ada
@ -53,6 +53,13 @@ def run_command_given(quteproc, command):
|
|||||||
quteproc.send_cmd(command)
|
quteproc.send_cmd(command)
|
||||||
|
|
||||||
|
|
||||||
|
@bdd.given("I have a fresh instance")
|
||||||
|
def fresh_instance(quteproc):
|
||||||
|
"""Restart qutebrowser instance for tests needing a fresh state."""
|
||||||
|
quteproc.terminate()
|
||||||
|
quteproc.start()
|
||||||
|
|
||||||
|
|
||||||
@bdd.when(bdd.parsers.parse("I run {command}"))
|
@bdd.when(bdd.parsers.parse("I run {command}"))
|
||||||
def run_command_when(quteproc, httpbin, command):
|
def run_command_when(quteproc, httpbin, command):
|
||||||
command = command.replace('(port)', str(httpbin.port))
|
command = command.replace('(port)', str(httpbin.port))
|
||||||
|
Loading…
Reference in New Issue
Block a user