Remove downloading test with deleting handler
This actually is kind of tricky, and it makes later tests fail because the tmpdir is suddenly gone...
This commit is contained in:
parent
54c32cc74e
commit
11abb642ab
@ -323,16 +323,6 @@ Feature: Downloading things from a website.
|
|||||||
And I wait until the download is finished
|
And I wait until the download is finished
|
||||||
Then "Opening *download.bin* with [*python*]" should be logged
|
Then "Opening *download.bin* with [*python*]" should be logged
|
||||||
|
|
||||||
Scenario: Opening a download with a handler which deletes the tmpdir
|
|
||||||
When I set storage -> prompt-download-directory to true
|
|
||||||
And I open data/downloads/download.bin
|
|
||||||
And I directly open the download with a handler deleting the tmpdir
|
|
||||||
And I wait until the download is finished
|
|
||||||
And I run :quit
|
|
||||||
Then "Opening *download.bin* with [*python*]" should be logged
|
|
||||||
And "Failed to clean up temporary download directory" should be logged
|
|
||||||
And qutebrowser should quit
|
|
||||||
|
|
||||||
# https://github.com/The-Compiler/qutebrowser/issues/1728
|
# https://github.com/The-Compiler/qutebrowser/issues/1728
|
||||||
|
|
||||||
Scenario: Cancelling a download that should be opened
|
Scenario: Cancelling a download that should be opened
|
||||||
|
@ -126,14 +126,6 @@ def download_open_with_prompt(quteproc):
|
|||||||
quteproc.send_cmd(':prompt-open-download {}'.format(cmd))
|
quteproc.send_cmd(':prompt-open-download {}'.format(cmd))
|
||||||
|
|
||||||
|
|
||||||
@bdd.when("I directly open the download with a handler deleting the tmpdir")
|
|
||||||
def download_open_with_prompt_deleting(quteproc):
|
|
||||||
cmd = ('{} -c "import sys, shutil, os.path; '
|
|
||||||
'shutil.rmtree(os.path.dirname(sys.argv[1]))"'.format(
|
|
||||||
shlex.quote(sys.executable)))
|
|
||||||
quteproc.send_cmd(':prompt-open-download {}'.format(cmd))
|
|
||||||
|
|
||||||
|
|
||||||
@bdd.when(bdd.parsers.parse("I delete the downloaded file {filename}"))
|
@bdd.when(bdd.parsers.parse("I delete the downloaded file {filename}"))
|
||||||
def delete_file(tmpdir, filename):
|
def delete_file(tmpdir, filename):
|
||||||
(tmpdir / filename).remove()
|
(tmpdir / filename).remove()
|
||||||
|
Loading…
Reference in New Issue
Block a user