test: seal real delivery and original Purge AB BA outcomes

This commit is contained in:
Agent Workbench Dev
2026-11-02 23:13:19 +08:00
parent 34e6923dcd
commit b4c72d0e36
902 changed files with 190125 additions and 1 deletions
@@ -0,0 +1,11 @@
import unittest
from workflow.normalize import normalize
from workflow.summary import summarize
from workflow.render import render
class Workflow(unittest.TestCase):
def test_number(self): self.assertEqual(normalize("3"), 3)
def test_negative(self): self.assertEqual(normalize(-2), 0)
def test_empty(self): self.assertEqual(summarize([]), {"count": 0, "total": 0})
def test_summary(self): self.assertEqual(summarize([2, 3]), {"count": 2, "total": 5})
def test_render(self): self.assertEqual(render({"count": 2, "total": 5}), "共 2 项 · 合计 5")
def test_zero(self): self.assertEqual(render({"count": 0, "total": 0}), "共 0 项 · 合计 0")