Update addon tests, bootstrap runtime, download progress, and worker functionality

- Modified status messages and stage labels in `test_addon.py` for clarity and consistency.
- Added tests to ensure proper host termination and command execution in `test_addon.py`.
- Enhanced `test_bootstrap_runtime.py` with additional tests for installation behavior, including handling of CUDA and MPS devices, and improved error handling for disk space and network checks.
- Updated download progress reporting in `test_download_progress.py` to include download speed and improved message formatting.
- Added new tests in `test_worker.py` for device selection, NPZ file validation, and model downloading behavior with Hugging Face endpoints.
- Bumped version in `uv.lock` to 0.9.30.
This commit is contained in:
2026-08-07 13:11:04 +08:00
parent e0cb995473
commit d08d0e9c1a
17 changed files with 1799 additions and 262 deletions

View File

@@ -61,8 +61,6 @@ def active_job():
def cancel_active_job():
global _active_job
if _active_job is None:
return
_active_job.cancelled = True
@@ -422,10 +420,12 @@ class RunJob(bpy.types.Operator):
stage_label = status.get("stage_label")
if not stage or not stages:
return message
stage_text = f"Step {stage}/{stages}"
if stage_label:
stage_text = f"{stage_text} {stage_label}"
return f"{stage_text}: {message}" if message else stage_text
text = (
f"{stage}/{stages} {stage_label}"
if stage_label
else f"{stage}/{stages}"
)
return f"{text}: {message}" if message else text
def _finish(self, context, job, return_code):
settings = context.scene.snapform_settings