more flake8 fixes

This commit is contained in:
Lincoln Stein
2023-09-07 09:20:23 -04:00
parent 11ead34022
commit c9a016f1a2
2 changed files with 4 additions and 11 deletions

View File

@ -2,8 +2,6 @@
Test the refactored model config classes.
"""
from pathlib import Path
from invokeai.backend.model_manager.config import (
ModelConfigFactory,
InvalidModelConfigException,

View File

@ -1,21 +1,17 @@
"""
Test the queued download facility
"""
"""Test the queued download facility"""
import pytest
import tempfile
import requests
from requests_testadapter import TestAdapter
from pathlib import Path
TestAdapter.__test__ = False
from invokeai.backend.model_manager.download import (
DownloadJobStatus,
DownloadQueue,
DownloadJobBase,
)
TestAdapter.__test__ = False
SAFETENSORS1_CONTENT = b"I am a safetensors file (1)"
SAFETENSORS1_HEADER = {
@ -75,12 +71,11 @@ def test_queue_priority():
id2 = queue.create_download_job(source="http://www.civitai.com/models/9999", destdir=tmpdir, start=False)
queue.change_priority(id1, -10) # make id1 run first
queue.change_priority(id1, -10) # make id1 run first
job1 = queue.id_to_job(id1)
job2 = queue.id_to_job(id2)
assert job1 < job2
id_list = list()
queue.start_all_jobs()
queue.join()
assert job1.job_sequence < job2.job_sequence
@ -89,7 +84,7 @@ def test_queue_priority():
id2 = queue.create_download_job(source="http://www.civitai.com/models/9999", destdir=tmpdir, start=False)
queue.change_priority(id2, -10) # make id2 run first
queue.change_priority(id2, -10) # make id2 run first
job1 = queue.id_to_job(id1)
job2 = queue.id_to_job(id2)
assert job2 < job1