From 2428e8882431b64957cae60d84a2b587d367c761 Mon Sep 17 00:00:00 2001 From: 69049ed6x <69049ed6x@users.noreply.github.com> Date: Sat, 7 Mar 2026 14:35:00 +0800 Subject: [PATCH] test: cover default factor rule labels --- tests/test_factor_rules.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_factor_rules.py b/tests/test_factor_rules.py index 7c887874..ed8c8441 100644 --- a/tests/test_factor_rules.py +++ b/tests/test_factor_rules.py @@ -174,6 +174,17 @@ class FactorRulesPathTests(unittest.TestCase): self.assertIn("- Bearish leaning rules: 1", summary) self.assertIn("- Neutral / mixed rules: 1", summary) + def test_summarize_factor_rules_includes_default_rule_name(self): + summary = summarize_factor_rules( + [{"signal": "bullish", "weight": "high"}], + ticker="META", + trade_date="2026-03-07", + ) + + self.assertIn("Rule 1: Rule 1", summary) + self.assertIn("- Signal bias: bullish", summary) + self.assertIn("- Weight: high", summary) + if __name__ == "__main__": unittest.main()