test(strategy): qualify the expected missing-market error
This commit is contained in:
@@ -21266,7 +21266,7 @@ mod tests {
|
||||
gap_config.stock_filter_expr = "close > 10.0".into();
|
||||
let gap_strategy = PlatformExprStrategy::new(gap_config);
|
||||
let indexed = gap_strategy.stock_state_with_factor_date(&gap_ctx, date, factor_date, symbol);
|
||||
assert!(matches!(&indexed, Err(BacktestError::Data(crate::data::DataSetError::MissingSnapshot {
|
||||
assert!(matches!(&indexed, Err(crate::BacktestError::Data(crate::data::DataSetError::MissingSnapshot {
|
||||
kind: "feature_market", date: missing_date, symbol: missing_symbol,
|
||||
})) if *missing_date == factor_date && missing_symbol == symbol),
|
||||
"missing decision-date OHLCV must not become execution-date values: {indexed:?}");
|
||||
@@ -21276,7 +21276,7 @@ mod tests {
|
||||
&gap_ctx, date, factor_date, missing_feature_day.symbol_id(symbol).unwrap(), symbol,
|
||||
&execution_view, &feature_view,
|
||||
);
|
||||
assert!(matches!(&viewed, Err(BacktestError::Data(crate::data::DataSetError::MissingSnapshot {
|
||||
assert!(matches!(&viewed, Err(crate::BacktestError::Data(crate::data::DataSetError::MissingSnapshot {
|
||||
kind: "feature_market", date: missing_date, ..
|
||||
})) if *missing_date == factor_date), "daily views must preserve the same missing-date boundary: {viewed:?}");
|
||||
assert!(gap_strategy.stock_state_cache.borrow().is_empty());
|
||||
|
||||
Reference in New Issue
Block a user