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> |
||
|---|---|---|
| .. | ||
| cassettes | ||
| e2e | ||
| integration | ||
| portfolio | ||
| unit | ||
| conftest.py | ||