test: cover zero factor rule weight
This commit is contained in:
parent
a12ea1fc83
commit
42977a7e00
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue