Skip to content

Commit 466c229

Browse files
committed
Fix failing unit test
Add algorithm start date so period history request is consistent
1 parent e416a54 commit 466c229

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Tests/Research/QuantBookHistoryTests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -797,14 +797,15 @@ public void HistoryDataDoesnNotReturnDataLabelWithBaseDataCollectionTypesAndPeri
797797
@"
798798
from AlgorithmImports import *
799799
800-
def getHistory():
800+
def get_history():
801801
qb = QuantBook()
802-
symbol = qb.AddEquity(""AAPL"", Resolution.Daily).symbol
803-
dataset_symbol = qb.AddData(FundamentalUniverse, symbol).symbol
804-
history = qb.History(dataset_symbol, 4015, Resolution.Daily)
802+
qb.set_start_date(2025, 1, 1)
803+
symbol = qb.add_equity(""AAPL"", Resolution.DAILY).symbol
804+
dataset_symbol = qb.add_data(FundamentalUniverse, symbol).symbol
805+
history = qb.history(dataset_symbol, 4015, Resolution.DAILY)
805806
return history
806807
");
807-
dynamic getHistory = testModule.GetAttr("getHistory");
808+
dynamic getHistory = testModule.GetAttr("get_history");
808809
var pyHistory = getHistory() as PyObject;
809810
var isHistoryEmpty = pyHistory.GetAttr("empty").GetAndDispose<bool?>();
810811
Assert.IsFalse(isHistoryEmpty);

0 commit comments

Comments
 (0)