mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
100% Coverage
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""Coverage for roboco.llm.metrics — singleton ToonMetrics holder."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from roboco.llm.metrics import _MetricsHolder, get_toon_metrics
|
||||
|
||||
|
||||
def test_get_toon_metrics_returns_singleton() -> None:
|
||||
_MetricsHolder.instance = None
|
||||
a = get_toon_metrics()
|
||||
b = get_toon_metrics()
|
||||
assert a is b
|
||||
|
||||
|
||||
def test_get_toon_metrics_creates_when_unset() -> None:
|
||||
_MetricsHolder.instance = None
|
||||
metrics = get_toon_metrics()
|
||||
assert metrics is not None
|
||||
Reference in New Issue
Block a user