Shenrui-Ma/video-regen-recipes / templates/character-short/bit-by-bit-heartache
bit-by-bit-heartache
Verified用角色参考图在本机制作 Heartache 连续动作配乐短片.
tests/test_runtime_runner.py
View on GitHubimport hashlib
import importlib
import json
from pathlib import Path
import sys
import tempfile
import unittest
RUNTIME = Path(__file__).resolve().parents[1] / 'scripts/runtime'
sys.path.insert(0, str(RUNTIME))
class RunnerTests(unittest.TestCase):
def test_lost_submit_response_never_reposts(self):
self.assertTrue((RUNTIME / 'run_segment.py').exists(), 'portable runner missing')
r = importlib.import_module('run_segment')
class API:
host = 'http://localhost:8188'
interval = 0
posts = 0
def request(self, path, body=None):
if path == '/object_info': return {'Example': {}}
if path == '/queue': return {'queue_running': [], 'queue_pending': []}
if path.startswith('/history/'): return {}
if path == '/prompt':
self.posts += 1
raise r.RunnerError('HTTP_IO_FAILED')
raise AssertionError(path)
with tempfile.TemporaryDirectory() as tmp:
api = API()
graph = {'1': {'class_type': 'Example', 'inputs': {}}}
first, code = r.run(api, graph, Path(tmp), False)
self.assertEqual(first['status'], 'AMBIGUOUS')
second, code = r.run(api, graph, Path(tmp), False)
self.assertEqual(second['status'], 'AMBIGUOUS')
self.assertEqual(api.posts, 1)
with self.assertRaises(r.RunnerError):
r.run(api, {'2': {'class_type': 'Example', 'inputs': {}}}, Path(tmp), False)
if __name__ == '__main__': unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |