From 92d3168f27d975873711d124177dd563056e99e6 Mon Sep 17 00:00:00 2001 From: 69049ed6x <69049ed6x@users.noreply.github.com> Date: Sat, 7 Mar 2026 18:47:42 +0800 Subject: [PATCH] test: cover tuple factor rule conditions --- tests/test_factor_rules.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_factor_rules.py b/tests/test_factor_rules.py index 471b03b3..0ff7ad88 100644 --- a/tests/test_factor_rules.py +++ b/tests/test_factor_rules.py @@ -309,6 +309,15 @@ class FactorRulesPathTests(unittest.TestCase): self.assertIn("- Conditions: {'threshold': 5}", summary) + def test_summarize_factor_rules_stringifies_tuple_conditions(self): + summary = summarize_factor_rules( + [{"name": "Carry", "signal": "neutral", "conditions": [("threshold", 5)]}], + ticker="LQD", + trade_date="2026-03-07", + ) + + self.assertIn("- Conditions: ('threshold', 5)", summary) + if __name__ == "__main__": unittest.main()