first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Tests for chart generation."""
|
||||
|
||||
from app.analysis.charts import boxplot, grouped_bar, heatmap
|
||||
|
||||
|
||||
def test_heatmap_returns_base64():
|
||||
data = {"m1": {"L1": 0.5, "L2": 0.8}}
|
||||
b64 = heatmap(data, title="Test")
|
||||
assert b64.startswith("iVBOR") or b64.startswith("/9j")
|
||||
|
||||
|
||||
def test_boxplot_returns_base64():
|
||||
data = {"m1-L1": [0.1, 0.2, 0.3]}
|
||||
b64 = boxplot(data, title="Test")
|
||||
assert isinstance(b64, str) and len(b64) > 0
|
||||
|
||||
|
||||
def test_grouped_bar_returns_base64():
|
||||
data = {"m1": {"L1": 0.5}}
|
||||
b64 = grouped_bar(data, title="Test")
|
||||
assert isinstance(b64, str) and len(b64) > 0
|
||||
Reference in New Issue
Block a user