test: cover empty string factor rule condition

This commit is contained in:
69049ed6x 2026-03-07 18:58:04 +08:00
parent 92d3168f27
commit 039c88b4ce
1 changed files with 9 additions and 0 deletions

View File

@ -318,6 +318,15 @@ class FactorRulesPathTests(unittest.TestCase):
self.assertIn("- Conditions: ('threshold', 5)", summary)
def test_summarize_factor_rules_preserves_empty_string_condition(self):
summary = summarize_factor_rules(
[{"name": "Carry", "signal": "neutral", "conditions": [""]}],
ticker="IEF",
trade_date="2026-03-07",
)
self.assertIn("- Conditions: ", summary)
if __name__ == "__main__":
unittest.main()