Conversation
…in tests/domain (#371) - test_backtest.py: Replace hardcoded forward-slash path to non-existent backtest_data/ CSV with os.path.join to existing test_data/ohlcv/ file - test_polars.py: Update datetime64[ns] assertion to datetime64[us] for newer pandas compatibility - test_backtest_save.py: Fix test_save_without_metrics to assert metrics.json is NOT created when no pre-computed metrics are provided (matching actual BacktestRun.save() behavior)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #371 for
tests/domain/andtests/cli/directories.Changes
tests/domain/models/backtesting/test_backtest.py
os.path.join()pointing to existingtest_data/ohlcv/filetests/domain/utils/test_polars.py
datetime64[ns]assertion todatetime64[us]for newer pandas compatibility (pandas now uses microsecond resolution by default)tests/domain/backtests/test_backtest_save.py
test_save_without_metricsto assertmetrics.jsonis NOT created when no pre-computed metrics are provided — this matches the actualBacktestRun.save()behavior which only writesmetrics.jsonwhenself.backtest_metricsis settests/cli/ — All 7 tests already passing (no changes needed)
Test Results
tests/domain/: 103 passed (was 96 passed, 7 failed)tests/cli/: 7 passed (no changes)