Files
brewpi/tests/utils/fixtures/missing_inner_hold_branch.json
T
jensandClaude Sonnet 5 5a874e3869 test: add fixture-driven suite for config_validate
Complements the inline-dict unit tests in test_config_validate.py with
10 real JSON config files under tests/utils/fixtures/ (valid sim/real/
Normal configs, one with legacy unknown keys that must NOT fail, and
six broken variants covering each distinct failure mode: missing gain,
missing Inner branch, missing pid_type, missing TempCtrl entirely,
wrong-typed gain, TempCtrl not a dict).

test_config_fixtures.py drives all of them from one CASES table
(fixture name -> expected pass/ConfigError-regex), plus a guard test
that fails if fixtures/ and CASES ever drift apart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F4oEE99rkKVU8L8tkzXWdG
2026-07-11 12:59:38 +02:00

59 lines
838 B
JSON

{
"ambient_temperature": 20,
"log_interval": 300,
"TempCtrl": {
"pid_type": "Smith",
"beta": 0.05,
"Outer": {
"kp": 0.4,
"ki": 0.0,
"kd": 0.0,
"kt": 0.0,
"y_hold_min": -0.1
},
"Inner": {
"Heat": {
"kp": 0.08,
"ki": 0.02,
"kd": 0.0,
"kt": 1.5
},
"Cool": {
"kp": 0.08,
"ki": 0.02,
"kd": 0.0,
"kt": 1.5
}
},
"Thresholds": {
"HoldHeat": 1.0,
"HoldCool": 1.0,
"HeatHold": 1.0,
"HeatCool": 1.0,
"CoolHold": 1.0,
"CoolHeat": 1.0
}
},
"Heater": {
"type": "sim"
},
"Stirrer": {
"type": "sim"
},
"TempSensor": {
"type": "sim",
"temp_offset": 0.0,
"sigma": 0.05,
"stirrer_sigma": 0.0,
"stirrer_tau": 20.0
},
"Pot": {
"mass": 5.96,
"material": "Edelstahl 18/10",
"L": 0.2,
"Td": 17,
"water_mass": 22,
"volumen": 30
}
}