Test: errori di configurazione e CSV, domini.toml non validi, exit code CLI, varianti di report e grafici
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bb2e3bd2d4
commit
cfb1eb66a5
5 files changed
+104
No files matched your search
@@ -94,3 +94,18 @@ def test_salita_complessiva_sotto_soglia_non_e_un_gradino(cfg):
|
||||
T[101] += 8.0
|
||||
T[102:] += 16.0 # 16 °C in due campioni: sotto la soglia di 20
|
||||
assert tipi(t, {"T_C": T, "dT_C": T - 23.0}, cfg) == ["riposo"]
|
||||
|
||||
|
||||
def test_domini_toml_vuoto_rifiutato(sintetico, tmp_path):
|
||||
t, _ = sintetico
|
||||
(tmp_path / "d.toml").write_text("# nessun dominio\n")
|
||||
with pytest.raises(ValueError, match="senza"):
|
||||
domini.leggi_toml(tmp_path / "d.toml", t)
|
||||
|
||||
|
||||
def test_domini_toml_intervallo_vuoto_rifiutato(sintetico, tmp_path):
|
||||
t, _ = sintetico
|
||||
(tmp_path / "d.toml").write_text('[[dominio]]\ntipo="riposo"\nt0_s=0\nt1_s=0\n'
|
||||
'[[dominio]]\ntipo="raffreddamento"\nt0_s=0\nt1_s=30\n')
|
||||
with pytest.raises(ValueError, match="vuoto"):
|
||||
domini.leggi_toml(tmp_path / "d.toml", t)
|
||||
Reference in new issue
Block a user