Fix broken regression tests (#5234)

This commit is contained in:
Juan José D'Ambrosio
2021-01-28 23:14:03 +00:00
committed by GitHub
parent 472896c2d0
commit 1778462505
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -39,7 +39,7 @@ class DelistingEventsAlgorithm(QCAlgorithm):
self.SetEndDate(2007, 5, 25) #Set End Date
self.SetCash(100000) #Set Strategy Cash
# Find more symbols here: http://quantconnect.com/data
self.AddEquity("AAA", Resolution.Daily)
self.AddEquity("AAA.1", Resolution.Daily)
self.AddEquity("SPY", Resolution.Daily)
@@ -50,7 +50,7 @@ class DelistingEventsAlgorithm(QCAlgorithm):
data: Slice object keyed by symbol containing the stock data
'''
if self.Transactions.OrdersCount == 0:
self.SetHoldings("AAA", 1)
self.SetHoldings("AAA.1", 1)
self.Debug("Purchased stock")
for kvp in data.Bars:
@@ -61,7 +61,7 @@ class DelistingEventsAlgorithm(QCAlgorithm):
# the slice can also contain delisting data: data.Delistings in a dictionary string->Delisting
aaa = self.Securities["AAA"]
aaa = self.Securities["AAA.1"]
if aaa.IsDelisted and aaa.IsTradable:
raise Exception("Delisted security must NOT be tradable")