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:
@@ -524,4 +524,4 @@ class TestMarketAnalysisFunctions:
|
||||
assert "price_per_sqm_stats" in stats
|
||||
assert stats["count"] == 3
|
||||
assert stats["price_stats"]["mean"] > 0
|
||||
assert stats["area_stats"]["mean"] > 0
|
||||
assert stats["area_stats"]["mean"] == pytest.approx(80.0)
|
||||
|
||||
Reference in New Issue
Block a user