Improve test assertion specificity and formatting

Replace broad assertion (mean > 0) with specific expected value using
pytest.approx for floating-point comparison. This makes the test more
robust and prevents future regressions.

Changes:
- Change area_stats mean assertion from > 0 to == pytest.approx(80.0)
- Add final newline to file per convention

Expected mean: (80 + 90 + 70) / 3 = 80.0

Addresses PR #2 review comments on line 527.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Nitzan Pomerantz
2025-10-24 19:27:32 +03:00
parent ac6c780419
commit 943a03ae5a
+1 -1
View File
@@ -524,4 +524,4 @@ class TestMarketAnalysisFunctions:
assert "price_per_sqm_stats" in stats assert "price_per_sqm_stats" in stats
assert stats["count"] == 3 assert stats["count"] == 3
assert stats["price_stats"]["mean"] > 0 assert stats["price_stats"]["mean"] > 0
assert stats["area_stats"]["mean"] > 0 assert stats["area_stats"]["mean"] == pytest.approx(80.0)