Files
AlphaFlow-MT5-ML-DL-Trading…/tests
google-labs-jules[bot] 01b82a03bc Add test file for data/data_loader.py
This commit introduces a new test file, `tests/test_data_loader.py`, to verify the functionality of `get_data_mt5`. It uses `unittest.mock.MagicMock` to mock the `MetaTrader5` module, allowing tests to run on Linux where the module cannot be imported.

The tests cover:
- Live trading data retrieval (`start_pos=None`).
- Backtesting data retrieval with a specific `start_pos`.
- Error handling when `copy_rates_from_pos` returns `None`.
- The proper conversion of rates into a pandas DataFrame with a parsed datetime index.

Co-authored-by: maghdam <63883156+maghdam@users.noreply.github.com>
2026-03-11 18:37:47 +00:00
..