test descriptions
This commit is contained in:
@@ -6,6 +6,7 @@ from meshnet_tracker.calibration import ToplocCalibrationStore
|
||||
|
||||
|
||||
def test_record_run_persists_and_reloads_from_sqlite(tmp_path):
|
||||
"Record run persists and reloads from sqlite\n\nTags: audit, calibration, persistence"
|
||||
db_path = str(tmp_path / "calibration.sqlite")
|
||||
store = ToplocCalibrationStore(db_path=db_path)
|
||||
store.record_run(
|
||||
@@ -26,6 +27,7 @@ def test_record_run_persists_and_reloads_from_sqlite(tmp_path):
|
||||
|
||||
|
||||
def test_gate_status_requires_minimum_distinct_hardware_profiles():
|
||||
"Gate status requires minimum distinct hardware profiles\n\nTags: audit, calibration"
|
||||
store = ToplocCalibrationStore()
|
||||
store.record_run(
|
||||
node_wallet="wallet-a", gpu_model="RTX 4090", dtype="bfloat16", model="m",
|
||||
@@ -43,11 +45,13 @@ def test_gate_status_requires_minimum_distinct_hardware_profiles():
|
||||
|
||||
|
||||
def test_gate_status_empty_corpus_is_never_ready():
|
||||
"Gate status empty corpus is never ready\n\nTags: audit, calibration"
|
||||
store = ToplocCalibrationStore()
|
||||
assert store.gate_status(min_hardware_profiles=0)["ready"] is False
|
||||
|
||||
|
||||
def test_envelope_derives_thresholds_from_worst_case_percentile_with_margin():
|
||||
"Envelope derives thresholds from worst case percentile with margin\n\nTags: audit, calibration"
|
||||
store = ToplocCalibrationStore()
|
||||
# 100 honest runs; exp_intersections mostly 8, worst honest reading 5.
|
||||
for i in range(100):
|
||||
@@ -72,6 +76,7 @@ def test_envelope_derives_thresholds_from_worst_case_percentile_with_margin():
|
||||
|
||||
|
||||
def test_envelope_returns_none_when_no_samples():
|
||||
"Envelope returns none when no samples\n\nTags: audit, calibration"
|
||||
store = ToplocCalibrationStore()
|
||||
envelope = store.envelope()
|
||||
assert envelope["recommended_min_exp_intersections"] is None
|
||||
|
||||
Reference in New Issue
Block a user