mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-09 13:50:49 +08:00
move and tweak tests
This commit is contained in:
parent
a164a07073
commit
79cf2c2867
@ -1,21 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import importlib.metadata
|
||||
import importlib.resources
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
import zipfile
|
||||
import importlib.metadata
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property
|
||||
from pathlib import Path
|
||||
from typing import Dict, TypedDict, Optional
|
||||
from aiohttp import web
|
||||
from importlib.metadata import version
|
||||
|
||||
import requests
|
||||
from aiohttp import web
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
from ..cli_args import DEFAULT_VERSION_STRING
|
||||
|
||||
@ -2,6 +2,7 @@ import importlib.resources
|
||||
import json
|
||||
import logging
|
||||
from importlib.abc import Traversable
|
||||
from typing import Any, AsyncGenerator
|
||||
|
||||
import pytest
|
||||
|
||||
@ -16,7 +17,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.fixture(scope="function", autouse=False)
|
||||
async def client(tmp_path_factory) -> Comfy:
|
||||
async def client(tmp_path_factory) -> AsyncGenerator[Any, Any]:
|
||||
async with Comfy() as client:
|
||||
yield client
|
||||
|
||||
|
||||
0
tests/models/__init__.py
Normal file
0
tests/models/__init__.py
Normal file
@ -1,11 +1,8 @@
|
||||
import unittest
|
||||
import torch
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
import unittest
|
||||
|
||||
import torch
|
||||
|
||||
# Add comfy to path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
|
||||
|
||||
def has_gpu():
|
||||
return torch.cuda.is_available()
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
import unittest
|
||||
import torch
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add comfy to path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
|
||||
import torch
|
||||
|
||||
|
||||
def has_gpu():
|
||||
return torch.cuda.is_available()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user