test: seal real delivery and original Purge AB BA outcomes
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
dist/
|
||||
.env
|
||||
.awb-*
|
||||
.venv/
|
||||
venv/
|
||||
__pycache__/
|
||||
.pytest_cache/
|
||||
@@ -0,0 +1 @@
|
||||
# Owned python engineering acceptance
|
||||
@@ -0,0 +1 @@
|
||||
Owner baseline staged file
|
||||
@@ -0,0 +1 @@
|
||||
Owner baseline unstaged file
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "git-delivery-fixture",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "node --test test/*.test.mjs",
|
||||
"build": "node scripts/build.mjs"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
[project]
|
||||
name = "python-delivery-fixture"
|
||||
version = "0.1.0"
|
||||
|
||||
[tool.agent-workbench.python]
|
||||
framework = "unittest"
|
||||
test-paths = ["tests"]
|
||||
@@ -0,0 +1 @@
|
||||
import fs from 'node:fs'; fs.cpSync('src', 'dist', { recursive: true }); console.log('Delivery fixture built.');
|
||||
@@ -0,0 +1 @@
|
||||
export const add = (a, b) => a + b;
|
||||
@@ -0,0 +1,2 @@
|
||||
def normalize(value):
|
||||
return -float(value)
|
||||
@@ -0,0 +1,2 @@
|
||||
def render(value):
|
||||
return ""
|
||||
@@ -0,0 +1,2 @@
|
||||
def summarize(values):
|
||||
return {"count": len(values), "total": 0}
|
||||
@@ -0,0 +1,4 @@
|
||||
import test from 'node:test'; import assert from 'node:assert/strict'; import { add } from '../src/add.mjs';
|
||||
test('adds positive values', () => assert.equal(add(2, 3), 5));
|
||||
test('adds negative values', () => assert.equal(add(-2, 3), 1));
|
||||
test('preserves integer addition', () => assert.equal(add(10, 1), 11));
|
||||
@@ -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