Commit Graph

5 Commits

Author SHA1 Message Date
c6ff93c764 test(sveta): Write tests for percentage function
Outcome: done
Changed: tests/test_calculator.py:1 (import), tests/test_calculator.py:66-96 (new TestPercentageFunction class)
Verified by: `make verify` — exit 0, Ran 23 tests, OK
Findings: tests/test_calculator.py:66-96 — TestPercentageFunction class added with 7 test methods (valid_percentage, zero_value, full_value, fractional, total_zero, float_arguments, negative_value). All 23 tests pass.
Open: none
Confidence: high — all acceptance criteria met, verification passed

Typosaurus-Run: ff52a86851934fd293e2f4493c5a9a46
Typosaurus-Node: 7edce3239d434d36aed06535aae0d0ad
Typosaurus-Agent: @sveta
Refs: #16
2026-07-26 17:45:06 +00:00
2f86b1c6cc test(sveta): Write tests for variance function
Outcome: done
Changed: tests/test_calculator.py:2, tests/test_calculator.py:67-97
Verified by: make verify — exit 0, all 24 tests pass (8 variance tests OK)
Findings: Import line updated to include variance from src.calculator at tests/test_calculator.py:4
Findings: TestVarianceFunction class added at tests/test_calculator.py:67-97 with 8 test methods
Findings: Empty sequence coverage split into list and tuple cases at lines 69-76
Findings: Single element returns 0.0 at line 78
Findings: Constant values return 0.0 at line 81
Findings: Known set [1,2,3,4,5] yields variance 2.0 at line 84
Findings: Two-element edge case [0,2] yields variance 1.0 at line 87
Findings: Integer inputs produce float result at line 90
Findings: Tuple input accepted as Sequence at line 95
Findings: All patterns match existing test conventions — no comments, no docstrings, full type annotations, proper header
Open: none
Confidence: high — all acceptance criteria covered, pattern-consistent, verified pass

Typosaurus-Run: 918d38b1535b44bea9a86b82deae5233
Typosaurus-Node: 3f6d4a888da94bb99d585efb53106ebd
Typosaurus-Agent: @sveta
Refs: #19
2026-07-26 17:07:10 +00:00
8605a8c596 test(sveta): Write clamp tests
Outcome: done
Changed: tests/__init__.py:1, tests/test_calculator.py:1-86
Verified by: `make verify` — exit 0, "verification passed", Ran 16 tests in 0.001s, OK
Findings: tests/ directory created at ./tests/ with __init__.py (header only) and test_calculator.py (16 tests for clamp).
Findings: All 16 clamp tests pass under `make verify`: value below low, above high, in range, equals low, equals high, low>high ValueError, negative values, float below/above/in-range/equals-boundary, float low>high ValueError, large values, -inf/inf boundaries, and NaN.
Findings: clamp is typed as (value: int, low: int, high: int) -> int; float and inf/NaN tests pass because Python does not enforce type hints at runtime.
Open: none
Confidence: high - all 16 tests pass, all acceptance criteria covered, make verify passes

Typosaurus-Run: 5b5c36bf38254bf4bfcdbde317991a5a
Typosaurus-Node: 56f03705c3d64023ba102d3aa3169ef2
Typosaurus-Agent: @sveta
Refs: #7
2026-07-25 19:04:03 +02:00
f5363514bf chore: reset calculator to a clean baseline 2026-07-25 18:58:10 +02:00
8f7f09f44a test(sveta): Write tests for multiply and divide
Outcome: done
Changed: tests/test_calculator.py:1-65, Makefile:1
Verified by: `make verify` — exit 0, "Ran 16 tests in 0.000s ... OK"
Findings: tests/test_calculator.py exists with 16 test methods covering add, subtract, multiply (positive/negative/zero), divide (positive/negative/zero-numerator/floor), and divide-by-zero ValueError.
           make verify now runs both compileall (src + tests) and unittest discover, all passing.
Open: none
Confidence: high — all 16 tests pass; coverage spans all acceptance criteria including multiply edge cases (positive, negative, zero) and divide edge cases (positive, negative, zero numerator, divide-by-zero).

Typosaurus-Run: d9404e45783a42b586e07fc0342eee5c
Typosaurus-Node: 00f8d57fc2964dc9bf5ae68ad25a6e18
Typosaurus-Agent: @sveta
Refs: #2
2026-07-25 17:08:53 +02:00