repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/run_review/test_text_review.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name,unused-argument
"""Synchronous text review: classification, parsing, caps and fail-open."""
from __future__ import annotations
import json
from pathlib import Path
import pytest
from services.run_review import admission
from services.run_review.text_rev... | 300 | 9,271 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/run_review/test_commit_tool_hooks.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name,unused-argument
"""Both agent commit tools must attach the sync review advisory."""
from __future__ import annotations
import json
import pytest
from services.project_files.agent_tools import (
AgentProjectToolContext,
AgentProjectTools,
)
from ... | 148 | 4,399 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/run_review/test_media_review.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name,unused-argument,protected-access
"""Async media review: admission, parsing, scheduling and the image loop."""
from __future__ import annotations
import asyncio
import json
import shutil
import subprocess
from pathlib import Path
from types import SimpleNa... | 693 | 21,265 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/run_review/test_rubric_prompts.py | .py | # -*- coding: utf-8 -*-
"""Rubric prompt generation and taste-principle derivation regression."""
from __future__ import annotations
from pathlib import Path
import pytest
from services.run_review.rubric_prompts import (
build_appeal_system_prompt,
build_image_check_system_prompt,
build_scene_check_syst... | 73 | 2,439 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_driver.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=line-too-long,protected-access,too-many-statements
# pylint: disable=unused-argument,use-implicit-booleaness-not-comparison
from __future__ import annotations
import asyncio
import hashlib
import io
import json
import pytest
from PIL import Image
from ap... | 4,846 | 170,242 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_yolo_completion_loop.py | .py | # -*- coding: utf-8 -*-
"""YOLO completion loop: a succeeded mainline is a checkpoint, not a finish.
Reproduces the 2026-08-05 field run: the model finished 4/5 elements,
wrote a progress summary and stopped — under an unattended mode the
Runtime must inject the "继续" a supervising user would have typed,
with fuses aga... | 102 | 3,054 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_native_media.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import asyncio
from types import SimpleNamespace
import pytest
from api.file_asset_routes import (
_AssetInput,
_ingest_many_sync,
_register_remote_asset_sync,
)
from services.file_agent_runtime import native_media
from services.project_files.fac... | 533 | 15,586 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_external_skills.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,consider-using-from-import
"""Agent skills: loading resilience, catalog rendering and the viewer tool."""
from __future__ import annotations
import asyncio
import json
from pathlib import Path
import pytest
from models import config
fro... | 424 | 14,797 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_subagents.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import pytest
from pydantic import ValidationError
from services.file_agent_runtime.subagents import (
DelegateToAgentInput,
delegate_tool_manifest,
)
from services.project_files.models import (
Project,
VisualCastLineup,
VisualEntity,
)
... | 250 | 8,167 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_benign_trailing_closers.py | .py | # -*- coding: utf-8 -*-
"""Benign trailing closers execute the lossless prefix instead of failing.
Reproduces the 2026-08 production case: a 4.4KB streamed tool-call
argument ended with exactly one surplus ``}`` after a complete JSON
object, forcing a repair-and-retry turn even though dropping the tail
was provably lo... | 75 | 2,152 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_async_observation.py | .py | # -*- coding: utf-8 -*-
"""Host-style async observation tools: background submit + batch harvest."""
from __future__ import annotations
import asyncio
from types import SimpleNamespace
from uuid import uuid5, NAMESPACE_URL
import pytest
from domain.enums import SpecialistRole, TaskKind
from domain.errors import Vali... | 184 | 6,302 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_specialist_file_tools.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
from __future__ import annotations
from domain.enums import SpecialistRole
from services.file_agent_runtime.subagents import specialist_system_prompt
from services.project_files.facade import CreatorFileServices
from services.project_files.models import Project
from service... | 248 | 8,651 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_goal_lifecycle.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Goal lifecycle recovery: terminal goals never wedge the Session.
Production incident: resuming after the mainline Goal reached COMPLETED
bound a fresh QUEUED run to the dead Goal. The dispatcher refuses to
start runs on terminal Goals and admission rejects ... | 441 | 15,329 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_creation_checkpoints.py | .py | # -*- coding: utf-8 -*-
"""Creation pit-stop checkpoints gate costly generation deterministically."""
from __future__ import annotations
import asyncio
import pytest
from domain.enums import SpecialistRole
from services.file_agent_runtime import (
AgentModelTurn,
AgentToolCall,
CallbackAgentChatClient,
... | 622 | 19,944 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_work_scheduler.py | .py | # -*- coding: utf-8 -*-
"""Work-graph scheduler: parallel fan-out with fuses, not a retry cannon.
The scheduler dispatches READY media nodes up to media_parallelism,
never redispatches the same node for the same inputs (FAILED stays
parked until something changes), and stays fully inert outside the
unattended ladder.
... | 335 | 10,867 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_model_client.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,use-implicit-booleaness-not-comparison
from __future__ import annotations
import asyncio
import json
from agentscope.message import (
DataBlock,
TextBlock,
ThinkingBlock,
ToolCallBlock,
ToolResultBlock,
ToolResultS... | 883 | 27,694 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/test_work_graph.py | .py | # -*- coding: utf-8 -*-
"""Work graph derivation: the production DAG projected from durable facts.
Every status is recomputed from project.json plus task records — the
graph is a view, never a second authority. These tests pin the node
identities, dependency edges and all seven states.
"""
from __future__ import annot... | 587 | 19,688 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/file_agent_runtime/conftest.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Shared fixtures for the file agent runtime test suite."""
from __future__ import annotations
import pytest
from services import external_skills
@pytest.fixture(autouse=True)
def _isolate_builtin_skills(tmp_path, monkeypatch):
"""Scan an empty builti... | 29 | 774 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/manual/test_real_gen_providers.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
"""Manual (real-key) acceptance checks for the WT5 generation providers.
Every case here spends money on Bailian (DashScope), so the whole module is
skipped unless ``CREATOR_GEN_REAL_TEST=1``. Run it from the isolated stack
environment so it never touches the main instance:... | 314 | 10,275 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/manual/test_real_asr_qwen3.py | .py | # -*- coding: utf-8 -*-
"""Manual (real-key) integration checks for the qwen3-asr branch.
Billed DashScope calls, so this is skipped unless CREATOR_ASR_REAL_TEST is set
and audio paths are provided. Run from an environment where the ASR model
resolves to qwen3-asr-flash (creator model_config.json or ASR_* env vars).
... | 109 | 4,069 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/manual/test_source_memory_real.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Manual real-model acceptance for the long-source memory build.
Runs the full P1/P2/P3 + embedding pipeline against a real,
down-sampled (~25 min) copy of the WT6 acceptance material and real
Creator model backends. Billed model calls are made; the suite is
... | 296 | 9,857 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/manual/test_real_document_reader.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
"""Real-call acceptance tests for the document reader (WT3 A-group).
Run explicitly:
pytest -m manual_real tests/manual/test_real_document_reader.py -v
Fixtures: point ``CREATOR_DOC_FIXTURES`` at a directory containing the
acceptance material (script PDF, storyboard P... | 266 | 9,449 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/manual/test_real_serper_grounding.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Manual real-provider acceptance for Serper grounding.
This opt-in entry point exercises the real Serper ``/search``, ``/images``,
``/lens`` and ``/scrape`` endpoints plus the no-OSS Uguu path. These calls
consume real quota. Every test skips unless
``SERPER... | 178 | 5,187 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/scripts/test_smoke_web_grounding.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=use-implicit-booleaness-not-comparison
from __future__ import annotations
import io
from PIL import Image
import pytest
from scripts.smoke_web_grounding import evaluate_result
# This file validates only the smoke result evaluator with local fixtures.
# The real-provider sm... | 74 | 2,120 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_work_graph_routes.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=unused-argument
"""Work-graph HTTP surface: derived DAG snapshot and manual dispatch."""
from __future__ import annotations
import asyncio
from httpx import ASGITransport, AsyncClient
async def _create_project(client: AsyncClient) -> str:
created = await client.post(
... | 71 | 2,291 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_project_file_api.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=consider-using-from-import,protected-access
from __future__ import annotations
import asyncio
from types import SimpleNamespace
import httpx
from fastapi import FastAPI
import api.project_file_routes as project_file_routes
from api.dependencies import creator_error_handler, ... | 1,240 | 41,559 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_model_resolved.py | .py | # -*- coding: utf-8 -*-
"""``GET /models/resolved`` must expose the same model identity execution uses.
The R2V workbench displays this value as the "模型" of an Element. It has to
match what ``get_video_model_name()`` returns at submission time, otherwise the
UI drifts from the provider actually receiving the task (se... | 22 | 792 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_project_import_export.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=unused-argument
"""Project archive export/import behavior and safety limits."""
from __future__ import annotations
import asyncio
import io
import zipfile
from uuid import uuid4
import pytest
from api import project_routes
from httpx import ASGITransport, AsyncClient
from s... | 246 | 8,411 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_file_runtime_api.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
from __future__ import annotations
import asyncio
import httpx
from fastapi import FastAPI
from api.dependencies import creator_error_handler, project_file_services
from api.file_execution_routes import router as execution_router
from api.file_session_routes import router... | 439 | 15,977 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_example_routes.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=unused-argument,redefined-outer-name
"""OSS-hosted inspiration example behavior."""
from __future__ import annotations
import asyncio
import hashlib
import io
import json
import zipfile
from uuid import uuid4
import pytest
from api import example_routes
from httpx import ASG... | 361 | 11,011 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_file_asset_routes.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,too-many-statements,unused-argument
# pylint: disable=use-implicit-booleaness-not-comparison
from __future__ import annotations
import asyncio
from contextlib import contextmanager
from hashlib import sha256
import httpx
from fastapi impo... | 751 | 26,192 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_file_model_api.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=use-implicit-booleaness-not-comparison,protected-access
from __future__ import annotations
import asyncio
import errno
import json
import os
from pathlib import Path
import threading
import time
import httpx
from fastapi import FastAPI
import pytest
from api.dependencies imp... | 868 | 32,203 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_plugin_host_error_contract.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,unused-argument
from __future__ import annotations
import asyncio
import importlib.util
import json
import sys
from pathlib import Path
import pytest
from fastapi import FastAPI
from httpx import ASGITransport, AsyncClient
from api.depen... | 243 | 8,598 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_projects.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=unused-argument,use-implicit-booleaness-not-comparison
from __future__ import annotations
import asyncio
from httpx import ASGITransport, AsyncClient
from services.project_files.json_pointer import hash_json_value
from services.project_files.models import Project
from servic... | 279 | 10,199 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_model_connection_probe.py | .py | # -*- coding: utf-8 -*-
"""Connectivity probes must stay zero-cost for non-chat models.
Submitting real tasks (ASR transcription, video synthesis) as a
connectivity "ping" is billable and is rejected by the DashScope
gateway with HTTP 403 "current user api does not support asynchronous
calls"; probes therefore use fre... | 131 | 3,939 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/test_timeline_motion_guard.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from api.file_execution_routes import (
_timeline_has_text_overlays_without_motion,
)
from services.project_files.facade import CreatorFileServices
from services.project_files.models import (
ElementLocation,
OverlayCreation,
Project,
Timel... | 187 | 4,813 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/api/conftest.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name,unused-argument
from __future__ import annotations
import pytest
from fastapi import FastAPI
from api.dependencies import creator_error_handler
from api.router import router
from domain.errors import CreatorError
from services.project_files.facade import ... | 32 | 882 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_session_store.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
from __future__ import annotations
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
import threading
import pytest
from domain.enums import CreatorGoalStatus, CreatorSessionStatus
from services.project_files import Project, ProjectS... | 981 | 31,391 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_terminal_task_run_reconciliation.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from pathlib import Path
import pytest
from domain.enums import (
SpecialistRole,
SpecialistRunStatus,
TaskKind,
TaskStatus,
)
from services.runtime_files.execution_models import (
SpecialistRunRecord,
TaskAttemptStatus,
TaskRecor... | 212 | 6,208 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_execution_store.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
from __future__ import annotations
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
import pytest
from domain.enums import (
SpecialistRole,
SpecialistRunStatus,
TaskKind,
TaskStatus,
)
from services.runtime_files.er... | 628 | 19,098 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_path_safety.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import re
import pytest
from services.runtime_files import (
RuntimeFileValidationError,
hashed_runtime_segment,
require_safe_runtime_segment,
)
pytestmark = pytest.mark.unit
def test_runtime_path_segment_rejects_traversal_and_control_charact... | 56 | 1,429 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_idempotency.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
from __future__ import annotations
from concurrent.futures import ThreadPoolExecutor
import pytest
from services.runtime_files import (
IdempotencyConflictError,
IdempotencyRecordStore,
IdempotencyStateConflictError,
IdempotencyStatus,
)
pytestmark = pyt... | 128 | 3,719 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_models.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from datetime import UTC, datetime
from pydantic import ValidationError
import pytest
from services.runtime_files import (
ChangeOrigin,
ChangeRoundRecord,
ProjectChangeKind,
ReviewBoundary,
ReviewOperation,
ReviewPolicy,
ReviewRe... | 148 | 4,652 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_safe_remote_download.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import subprocess
from types import SimpleNamespace
import httpx
import pytest
from services.runtime_files import safe_remote_download
from services.runtime_files.safe_remote_download import (
SafeRemoteDownloadError,
safe_curl_download_to_file,
... | 322 | 9,349 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_manual_edit_store.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
import pytest
from services.project_files import Project, ProjectStore
from services.runtime_files.manual_edit_store import (
ManualEditBufferStore,
ManualEditChangeConflict,
... | 479 | 13,395 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_atomic_store.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from concurrent.futures import ThreadPoolExecutor
import errno
import os
from pathlib import Path
from pydantic import BaseModel, ConfigDict
import pytest
from services.runtime_files import atomic_store as atomic_store_module
from services.runtime_files impo... | 200 | 6,318 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_jsonl_store.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import errno
import json
import multiprocessing
import os
from pathlib import Path
from pydantic import BaseModel, ConfigDict
import pytest
from services.runtime_files import atomic_store as atomic_store_module
from services.runtime_files import (
Durabl... | 188 | 5,994 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_locks.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=arguments-out-of-order
from __future__ import annotations
from datetime import UTC, datetime, timedelta
import multiprocessing
import pytest
from services.runtime_files import (
CrossProcessFileLock,
FieldBlockConflictError,
FieldBlockBaseCon... | 190 | 5,609 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/runtime_files/test_status_projection.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from domain.enums import (
CreatorSessionStatus,
SpecialistRole,
SpecialistRunStatus,
TaskKind,
TaskStatus,
)
from services.runtime_files.execution_models import (
SpecialistRunRecord,
TaskRecord,
)
from services.runtime_files.model... | 109 | 3,239 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_media_review_mode.py | .py | # -*- coding: utf-8 -*-
"""media_review auto_approve: the last gate of the unattended ladder.
``required`` (default) parks generated media behind a pending Review;
``auto_approve`` reuses the AUTO_FIX acceptance path so unattended runs
never wait on a human quality gate.
"""
from __future__ import annotations
import ... | 137 | 3,972 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_review_admission.py | .py | # -*- coding: utf-8 -*-
"""Review-pending admission for paid media generation."""
from __future__ import annotations
import asyncio
from datetime import UTC, datetime
import logging
import pytest
from domain.errors import ConflictError, ReviewPendingError, ValidationError
from services.media_files.image_execution i... | 423 | 13,170 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_r2v_modes.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=unused-argument
"""r2v_generation mode plumbing through the durable execution service."""
from __future__ import annotations
import asyncio
import pytest
from domain.errors import ValidationError
from services.media_files.image_execution import FileImageExecutionService
from... | 492 | 15,184 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_freeze_padding.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Freeze-frame padding must never reference a missing audio stream."""
from __future__ import annotations
import pytest
from services.media_files.local_execution import FfmpegLocalMediaRunner
pytestmark = pytest.mark.unit
def _filter(**kwargs: object) ->... | 42 | 1,208 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_r2v_transient_retry.py | .py | # -*- coding: utf-8 -*-
"""Transient R2V failures reopen a retry slot; deterministic ones stay walls.
Mirrors test_image_transient_retry for the video path: a network blip
failed the R2V Task terminally, and because identical retries derive the
same durable slot, every same-argument resend replayed the FAILED task
for... | 182 | 5,640 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_span_reconcile.py | .py | # -*- coding: utf-8 -*-
"""The published video's real duration drives the element span.
An s2v clip only lasts as long as its driving audio; the plan may have
reserved more room. Publishing must shrink the span to the delivered
footage and pull later elements forward so the final cut stays seamless
instead of freezing... | 137 | 4,323 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_motion_clip.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=redefined-outer-name
"""Motion clip elements: a full-canvas motion document as the segment
picture (pure motion-graphics cuts)."""
from __future__ import annotations
import asyncio
import importlib.util
import shutil
import subprocess
import pytest
from domain.enums import ... | 181 | 5,329 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_cast_lineup_pipeline.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Cast lineup pipeline: group anchor generation and reference-chain lead.
The lineup locks relative consistency (scale ratios, shared style
baseline, spatial order) that per-entity continuity cannot express, so
its selected image must lead every storyboard/vi... | 329 | 11,145 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_transitions.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access
from __future__ import annotations
import pytest
from domain.errors import ValidationError as DomainValidationError
from services.media_files.local_execution import (
FfmpegLocalMediaRunner,
_plan_timeline_transitions,
_valid... | 404 | 12,828 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_motion_blueprints.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access,redefined-outer-name,unused-argument
"""Blueprint catalog: rendering contract and design-validation wiring."""
from __future__ import annotations
import hashlib
import pytest
from domain.errors import ValidationError
from services.media_files import motion_... | 293 | 10,585 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_still_image_segment.py | .py | # -*- coding: utf-8 -*-
"""Still-image segments: pure motion-graphics cuts render generated
backdrops as timeline segments (ffmpeg -loop 1 path)."""
from __future__ import annotations
import asyncio
import shutil
import subprocess
import pytest
from domain.enums import CreatorCommandType
from services.media_files.l... | 102 | 2,689 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_image_transient_retry.py | .py | # -*- coding: utf-8 -*-
"""Transient image failures reopen a retry slot; deterministic ones stay walls.
Reproduces the 2026-08 production deadlock: a network blip failed the
image Task terminally, and because identical retries derive the same
durable slot, every same-argument resend hit "图片 Task 已终止: FAILED"
forever.
... | 183 | 6,045 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_secure_video_stream.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=redefined-builtin,protected-access
from __future__ import annotations
import asyncio
from functools import wraps
import hashlib
import inspect
import os
from pathlib import Path
import socket
import threading
import httpx
import pytest
from domain.errors... | 630 | 19,207 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_motion_design.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=unused-argument,protected-access,redefined-outer-name
from __future__ import annotations
import asyncio
import hashlib
import json
import pytest
from domain.errors import ValidationError
from services.media_files import local_execution as local_executio... | 1,332 | 44,465 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_r2v_inflight_dedup.py | .py | # -*- coding: utf-8 -*-
"""Independent submissions of the same R2V command attach to one task.
Reproduces the 2026-08 production incident: consecutive review approvals
interrupt the delegating director mid-generation; the re-delegated
director resubmits the identical command under a fresh tool-call id and
the provider... | 197 | 6,349 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_color_grade.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""Unified colour grading: one deterministic pass over the composited cut."""
from __future__ import annotations
import shutil
import subprocess
import pytest
from domain.enums import CreatorCommandType
from services.media_files.local_execution import (
... | 139 | 3,982 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_image_artifact_naming.py | .py | # -*- coding: utf-8 -*-
"""Naming rules for GENERATE_ASSET artifact versions."""
from __future__ import annotations
from datetime import datetime, timezone
from pathlib import Path
import pytest
from domain.enums import CreatorCommandType
from domain.errors import ValidationError
from services.media_files.image_exec... | 123 | 4,241 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_call_budget.py | .py | # -*- coding: utf-8 -*-
"""The media call budget: an honest call-count fuse, never estimated money."""
from __future__ import annotations
import asyncio
import pytest
from domain.enums import TaskKind, TaskStatus
from services.media_files.call_budget import (
MediaCallBudgetExhausted,
ensure_media_call_budge... | 175 | 5,680 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_image_translate_resume.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access,unused-argument
"""Restart recovery resumes a billed image translate instead of losing it.
A crashed process leaves a RUNNING image Task with a claimed provider call
and no result. The qwen-mt-image task behind it is already billed and its
id is durable, so re... | 842 | 28,113 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_keyframe_cache.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from pathlib import Path
import subprocess
import pytest
from domain.errors import StorageIntegrityError
from services.media_files import keyframe_cache
def test_materialize_keyframe_persists_and_reuses_deterministic_jpeg(
tmp_path: Path,
monkeypat... | 83 | 2,403 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_image_fanout_staleness.py | .py | # -*- coding: utf-8 -*-
"""Staleness policy for image publishes when the Project moves mid-render.
Reproduces the 2026-08-07 fan-out incident: four storyboards rendered in
parallel, the first commit bumped the generation, and the whole-project
staleness gate quarantined the other three finished (billed) renders.
"""
f... | 209 | 6,898 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_image_safety_rejection.py | .py | # -*- coding: utf-8 -*-
"""Safety refusals must name the refs they saw and block verbatim resends.
Reproduces the 2026-08-05 field incident: 22 consecutive 400s because the
model narrated "removing the photo references" while resending the exact
same reference list on every call.
"""
from __future__ import annotations... | 160 | 5,180 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_visual_design_readiness.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import pytest
from domain.enums import CreatorCommandType
from domain.errors import ValidationError
from services.media_files.image_execution import _resolve_request
from services.media_files.visual_design_readiness import (
assert_visual_design_ready_for... | 182 | 5,798 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_r2v_staleness.py | .py | # -*- coding: utf-8 -*-
"""Staleness policy for R2V publishes when the Project moves mid-render."""
from __future__ import annotations
import asyncio
import pytest
from domain.errors import ConflictError
from services.media_files.image_execution import FileImageExecutionService
from services.media_files.r2v_executio... | 242 | 7,583 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_r2v_materialize_retry.py | .py | # -*- coding: utf-8 -*-
"""A flaky download must not terminalize an already-generated video."""
# pylint: disable=protected-access
from __future__ import annotations
import asyncio
from types import SimpleNamespace
import httpx
import pytest
from domain.errors import ValidationError
from services.media_files import ... | 127 | 3,638 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/media_files/test_motion_js_timeline.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,redefined-outer-name,unused-argument
from __future__ import annotations
import hashlib
import json
import shutil
import struct
import zlib
from collections.abc import Callable
from pathlib import Path
import pytest
from domain.errors im... | 1,274 | 43,910 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/validators/test_transaction_completion.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from dataclasses import replace
from services.validators.base import ValidationIssue, ValidationReport
from services.validators.transaction import (
CompletionSnapshot,
validate_completion,
)
VALID = CompletionSnapshot(
transaction_id="tx-1",
... | 61 | 1,817 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_media_transport.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
from __future__ import annotations
import asyncio
import base64
import io
import httpx
import pytest
from PIL import Image
from models import media_transport
from models.media_transport import (
SEEDANCE_REFERENCE_IMAGE_MAX_BYTES,
_upload_local_file_to_dashscope_t... | 344 | 9,943 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_agent_turn_limits.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import pytest
from models import config as creator_config
from models.config import (
DEFAULT_MAINLINE_MAX_MODEL_TURNS,
DEFAULT_SPECIALIST_MAX_MODEL_TURNS,
get_mainline_max_model_turns,
get_specialist_max_model_turns,
scale_mainline_max_mo... | 71 | 2,202 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_user_config_decrypts_secrets.py | .py | # -*- coding: utf-8 -*-
"""Test _get_user_config() decrypts encrypted secret fields."""
# pylint: disable=protected-access
from __future__ import annotations
import json
from pathlib import Path
from unittest.mock import patch
from models import config
def test_get_user_config_decrypts_encrypted_secrets(tmp_path: P... | 196 | 5,931 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_embedding_config.py | .py | # -*- coding: utf-8 -*-
"""creator_embedding_model config-tree resolution tests."""
from __future__ import annotations
from models import config
def test_embedding_config_reuses_vlm_key(monkeypatch) -> None:
monkeypatch.delenv("EMBEDDING_API_KEY", raising=False)
monkeypatch.setattr(
config,
"... | 62 | 2,099 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_image_modes.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,unused-argument
"""qwen-image mode semantics: generate / edit / translate.
All provider HTTP traffic is stubbed (respx); no real model is ever called.
"""
from __future__ import annotations
import asyncio
import httpx
import pytest
impo... | 312 | 9,584 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_dashscope_image_async.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,unused-argument
"""DashScope image async-task transport: submit, poll, decode.
The provider submits with ``X-DashScope-Async: enable`` and polls the task
endpoint, so no HTTP call ever spans a render. A sync answer (proxy that
ignores the ... | 286 | 9,434 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_image_concurrency_config.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from models import config as model_config
from models.image.dashscope_provider import DashScopeImageModel
from models.image.openai_provider import OpenAIImageModel
def test_dashscope_image_concurrency_accepts_generic_creator_fallback(
monkeypatch,
) -> N... | 45 | 1,598 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_gen_provider_review_fixes.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,unused-argument
"""Regressions for the WT5 code-review findings (all HTTP stubbed)."""
from __future__ import annotations
import asyncio
import io
import json
import httpx
import pytest
import respx
from PIL import Image
from models imp... | 1,165 | 37,354 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_tts_capabilities.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
# flake8: noqa: E501
"""Capability-driven routing of the supported speech-synthesis models."""
from __future__ import annotations
import asyncio
import json
import pytest
from models import config as model_config
from models import tts_model
from models.tts... | 168 | 5,093 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_tts_model.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access,unused-argument
# flake8: noqa: E501
from __future__ import annotations
import asyncio
import json
import pytest
from models import config as model_config
from models import tts_model
def test_require_text_rejects_empty_and_overlong() -> None:
with py... | 303 | 10,574 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_image_config_fallback.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
from __future__ import annotations
from models import config
from models import image as image_models
def test_generic_qwen_image_env_selects_dashscope_and_is_consumed(
monkeypatch,
) -> None:
monkeypatch.delenv("IMAGE_MODEL", raising=False)
monkeypatch.delenv... | 39 | 1,460 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_video_concurrency_config.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from models import config as model_config
def test_video_concurrency_env_override_wins(monkeypatch) -> None:
monkeypatch.setenv("VIDEO_CONCURRENCY", "2")
assert model_config.get_video_concurrency() == 2
def test_unconfigured_video_concurrency_follo... | 27 | 904 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_video_config_urls.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
from __future__ import annotations
from models import config
def test_wan_video_urls_accept_api_root(monkeypatch) -> None:
monkeypatch.setattr(
config,
"get_video_base_url",
lambda: "https://workspace.example/api/v1",
)
monkeypatch.seta... | 50 | 1,548 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_image_reference_validation.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access
from __future__ import annotations
import asyncio
import io
from PIL import Image
from models.image.dashscope_provider import DashScopeImageModel
def _png_bytes() -> bytes:
output = io.BytesIO()
Image.new("RGB", (8, 8), color="... | 69 | 1,710 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_image_remote_download.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
import asyncio
from pathlib import Path
import httpx
from models.image import base as image_base
def test_remote_image_uses_bounded_curl_when_httpx_transport_cannot_reach_oss(
tmp_path,
monkeypatch,
):
monkeypatch.setenv("CREATOR_DATA_ROOT", st... | 57 | 1,646 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_openai_image_background.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,unused-argument
"""OpenAI image background mode: Responses API submit, poll, decode.
Background mode is opt-in via ``background_model`` (the Responses-API host
model); empty keeps the classic synchronous Images API untouched, because
gpt-i... | 311 | 10,070 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_vlm_text_config_fallback.py | .py | # -*- coding: utf-8 -*-
from __future__ import annotations
from models import config
def _clear_vlm_env(monkeypatch) -> None:
for name in (
"VLM_API_KEY",
"DASHSCOPE_API_KEY",
"VLM_BASE_URL",
"DASHSCOPE_BASE_URL",
"VLM_MODEL_NAME",
):
monkeypatch.delenv(name, r... | 65 | 1,969 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_asr_qwen3.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access
"""Unit tests for the qwen3-asr protocol branch (respx-stubbed, no billing)."""
from __future__ import annotations
import asyncio
import json
import httpx
import pytest
import respx
from models import config
from models import asr_model... | 608 | 20,352 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_openai_image_url.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access
"""OpenAI image provider URL construction must tolerate /v1-suffixed base URLs.
The UI saves official OpenAI endpoints as ``https://api.openai.com/v1``
(matching the connection probe, which appends ``/models/{name}``), while the
routify de... | 83 | 2,529 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_video_happyhorse.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access
from __future__ import annotations
import asyncio
import pytest
from models import config as model_config
from models import video_model
from models.video_capabilities import (
is_happyhorse_model,
video_model_prompt_guidance,
)... | 256 | 7,633 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_video_modes.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access
"""Video generation mode matrix: t2v / i2v / video_edit payloads & gating.
Provider HTTP traffic is stubbed; no real model is ever called.
"""
from __future__ import annotations
import asyncio
import httpx
import pytest
from models imp... | 554 | 17,564 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_grounding_config.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
from models import config
def test_persisted_grounding_disabled_wins_over_enabled_environment(
tmp_path,
monkeypatch,
):
config_path = tmp_path / "model_config.json"
config_path.write_text(
'{"grounding":{"enabled":false}}',
en... | 224 | 7,296 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_asr_model.py | .py | # -*- coding: utf-8 -*-
# pylint: disable=protected-access
from __future__ import annotations
import asyncio
from models import config
from models import asr_model
from models.asr_model import _sentences
def test_fun_asr_result_normalizes_sentence_timestamps() -> None:
result = _sentences(
{
... | 182 | 5,232 |
QwenPaw | plugins/apps/qwenpaw-creator/backend/tests/models/test_s2v_model.py | .py | # -*- coding: utf-8 -*-
# flake8: noqa: E501
# pylint: disable=protected-access,unused-argument
"""wan2.2-s2v protocol client: detect / submit / poll (all HTTP stubbed)."""
from __future__ import annotations
import asyncio
import io
import json
import httpx
import pytest
import respx
from PIL import Image
from mode... | 364 | 12,345 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.