Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 4, 2024
1 parent 5c95583 commit e00c1d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions parfive/tests/test_downloader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os
import platform
import threading
from time import sleep
from pathlib import Path
from tempfile import gettempdir
from time import sleep
from unittest import mock
from unittest.mock import patch

Expand Down Expand Up @@ -524,6 +524,7 @@ def __init__(self, *args, **kwargs):
def run(self):
self.result = self._target(*self._args, **self._kwargs)


@skip_windows
def test_download_out_of_main_thread(httpserver, tmpdir, recwarn):
tmpdir = str(tmpdir)
Expand All @@ -542,5 +543,10 @@ def test_download_out_of_main_thread(httpserver, tmpdir, recwarn):
validate_test_file(thread.result)

assert len(recwarn) > 0
assert any(['This download has been started in a thread which is not the main thread. You will not be able to interrupt the download.' ==
w.message.args[0] for w in recwarn])
assert any(
[
"This download has been started in a thread which is not the main thread. You will not be able to interrupt the download."
== w.message.args[0]
for w in recwarn
]
)

0 comments on commit e00c1d5

Please sign in to comment.