Skip to content

Commit 14c2b9d

Browse files
committed
refactor(test): make the test_delta.QfcTestCase.fail typed and showing the job type
1 parent c17dabf commit 14c2b9d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docker-app/qfieldcloud/core/tests/test_delta.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
import time
55
from datetime import datetime
6+
from typing import NoReturn
67
from unittest import mock, skip
78
from uuid import UUID
89

@@ -111,9 +112,10 @@ def tearDown(self):
111112
time.sleep(1)
112113
return
113114

114-
def fail(self, msg: str, job: Job = None):
115+
def fail(self, msg: str = "", job: Job | None = None) -> NoReturn:
115116
if job:
116-
msg += f"\n\nOutput:\n================\n{job.output}\n================"
117+
msg += f"\n\nJobType:{job.type}\n"
118+
msg += f"Output:\n================\n{job.output}\n================"
117119

118120
if job.feedback:
119121
if "error_stack" in job.feedback:

0 commit comments

Comments
 (0)