added RAG, Multiuser, TG bot
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from datetime import date
|
||||
|
||||
from app.fitness.charts import linear_regression, week_start
|
||||
|
||||
|
||||
def test_week_start_monday():
|
||||
assert week_start(date(2026, 6, 13)) == date(2026, 6, 8)
|
||||
|
||||
|
||||
def test_linear_regression_increasing():
|
||||
points = [(0.0, 1.0), (1.0, 2.0), (2.0, 3.0)]
|
||||
fit = linear_regression(points)
|
||||
assert fit is not None
|
||||
assert abs(fit["slope"] - 1.0) < 1e-9
|
||||
assert abs(fit["intercept"] - 1.0) < 1e-9
|
||||
|
||||
|
||||
def test_linear_regression_requires_two_points():
|
||||
assert linear_regression([(0.0, 5.0)]) is None
|
||||
assert linear_regression([]) is None
|
||||
Reference in New Issue
Block a user