mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fix Flake8 errors by using a pytest conftest.py file.
This commit is contained in:
parent
7d800e1ce3
commit
9854b244fd
@ -2,7 +2,7 @@ import pytest
|
||||
import torch
|
||||
|
||||
from invokeai.backend.model_management.models.base import BaseModelType, ModelType, SubModelType
|
||||
from invokeai.backend.util.test_utils import install_and_load_model, model_installer, slow, torch_device
|
||||
from invokeai.backend.util.test_utils import install_and_load_model, slow
|
||||
|
||||
|
||||
def build_dummy_sd15_unet_input(torch_device):
|
||||
|
6
tests/conftest.py
Normal file
6
tests/conftest.py
Normal file
@ -0,0 +1,6 @@
|
||||
# conftest.py is a special pytest file. Fixtures defined in this file will be accessible to all tests in this directory
|
||||
# without needing to explicitly import them. (https://docs.pytest.org/en/6.2.x/fixture.html)
|
||||
|
||||
# We import the model_installer and torch_device fixtures here so that they can be used by all tests. Flake8 does not
|
||||
# play well with fixtures (F401 and F811), so this is cleaner than importing in all files that use these fixtures.
|
||||
from invokeai.backend.util.test_utils import model_installer, torch_device # noqa: F401
|
Loading…
Reference in New Issue
Block a user