test: seal real delivery and original Purge AB BA outcomes
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user