diff --git a/tests/test_factor_rules.py b/tests/test_factor_rules.py index 557c7eb5..6ed6c5e9 100644 --- a/tests/test_factor_rules.py +++ b/tests/test_factor_rules.py @@ -282,6 +282,15 @@ class FactorRulesPathTests(unittest.TestCase): self.assertIn("Rule 1: Rule 1", summary) self.assertIn("- Signal bias: neutral", summary) + def test_summarize_factor_rules_preserves_zero_weight_value(self): + summary = summarize_factor_rules( + [{"name": "Carry", "signal": "neutral", "weight": 0}], + ticker="USO", + trade_date="2026-03-07", + ) + + self.assertIn("- Weight: 0", summary) + if __name__ == "__main__": unittest.main()