TradingAgents/tests/portfolio
google-labs-jules[bot] a14de62f1e 🧪 Add comprehensive unit tests for portfolio config validation
Implemented `tests/portfolio/test_config.py` to test the `validate_config` function in `tradingagents/portfolio/config.py`.

Key improvements:
- Added `test_validate_config_max_positions_invalid` to verify `max_positions` boundary conditions (0, -1).
- Added happy path test `test_validate_config_valid`.
- Added tests for `max_position_pct`, `max_sector_pct`, `min_cash_pct`, and `default_budget` validation.
- Verified that tests correctly catch bugs by temporarily disabling validation logic.

These tests ensure the portfolio manager configuration is robustly validated before use.

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
2026-03-21 01:34:31 +00:00
..
__init__.py feat: portfolio manager data foundation — docs, SQL migration, and module scaffolding 2026-03-20 10:40:48 +00:00
conftest.py feat: complete portfolio data foundation — psycopg2 client, repository, tests 2026-03-20 14:06:50 +01:00
test_config.py 🧪 Add comprehensive unit tests for portfolio config validation 2026-03-21 01:34:31 +00:00
test_models.py feat: implement Portfolio models, ReportStore, and tests; fix SQL constraint 2026-03-20 11:16:39 +00:00
test_report_store.py feat: implement Portfolio models, ReportStore, and tests; fix SQL constraint 2026-03-20 11:16:39 +00:00
test_repository.py feat: complete portfolio data foundation — psycopg2 client, repository, tests 2026-03-20 14:06:50 +01:00