fix(cli): consolidate duplicate get_ticker and only announce non-stock asset type

This commit is contained in:
Yijia-Xiao
2026-05-31 06:13:35 +00:00
parent 8a22594607
commit 2c9f1bfe65
3 changed files with 32 additions and 34 deletions

View File

@@ -16,6 +16,14 @@ class TickerSymbolHandlingTests(unittest.TestCase):
self.assertIn("7203.T", context)
self.assertIn("exchange suffix", context)
def test_single_get_ticker_no_shadow(self):
# Regression: cli/main.py had a duplicate get_ticker with an empty
# questionary prompt (rendered as a bare "?") that shadowed the
# descriptive one in cli/utils. Keep a single canonical definition.
import cli.main
import cli.utils
self.assertIs(cli.main.get_ticker, cli.utils.get_ticker)
if __name__ == "__main__":
unittest.main()