Skip to content

Commit 437d302

Browse files
committed
Fix CI
1 parent c7c25f2 commit 437d302

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/conftest.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def __init__(self, loop: QtTestApp, enabled=True):
120120
self.worker_log = None
121121
self.worker_url = ""
122122
self.worker_secret = ""
123-
self._worker_config_default = self.read_worker_config()
124123
self.enabled = has_local_cloud and enabled
124+
self._worker_config_default = self.read_worker_config()
125125

126126
async def serve(self, process: asyncio.subprocess.Process, log_file):
127127
try:
@@ -159,10 +159,12 @@ async def launch_coordinator(self):
159159
stderr=asyncio.subprocess.STDOUT,
160160
)
161161

162-
def read_worker_config(self):
163-
config = self.workspace / "worker.json"
164-
assert config.exists(), "Worker config not found"
165-
return json.loads(config.read_text(encoding="utf-8"))
162+
def read_worker_config(self) -> dict[str, Any]:
163+
if self.enabled:
164+
config = self.workspace / "worker.json"
165+
assert config.exists(), "Worker config not found"
166+
return json.loads(config.read_text(encoding="utf-8"))
167+
return {}
166168

167169
async def launch_worker(self, update_config=None):
168170
if self.worker_proc and self.worker_proc.returncode is None:

0 commit comments

Comments
 (0)