Skip to content

Commit fca50c0

Browse files
committed
Tests: fix running without .env file
1 parent 38e17a9 commit fca50c0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ai_diffusion/ui/theme.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from ..settings import Setting
99
from ..style import Arch
1010
from ..client import Client
11+
from ..localization import translate as _
1112
from ..platform_tools import is_windows
1213
from ..util import client_logger as log
1314

@@ -30,6 +31,8 @@
3031
QComboBox QAbstractItemView {{ selection-color: {highlight}; }}
3132
"""
3233

34+
copy_to_clipboard_string = _("Copy to clipboard") # keeping translations for future use
35+
3336
icon_path = Path(__file__).parent.parent / "icons"
3437

3538

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ def __init__(self, loop: QtTestApp, enabled=True):
108108
self.dir = root_dir / "service"
109109
self.log_dir = result_dir / "logs"
110110
self.log_dir.mkdir(exist_ok=True)
111-
self.url = os.environ["TEST_SERVICE_URL"]
111+
self.url = os.environ.get("TEST_SERVICE_URL", "http://localhost:8787")
112112
self.coord_proc: asyncio.subprocess.Process | None = None
113113
self.coord_log = None
114114
self.worker_proc: asyncio.subprocess.Process | None = None
115115
self.worker_task: asyncio.Task | None = None
116116
self.worker_log = None
117-
self.enabled = enabled
117+
self.enabled = has_local_cloud and enabled
118118

119119
async def serve(self, process: asyncio.subprocess.Process, log_file):
120120
try:

0 commit comments

Comments
 (0)