Add python syntax check (#8651)
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Add python syntax check * Fix some python regression algorithms * Fixing more bugs
This commit is contained in:
@@ -30,16 +30,16 @@ class ForwardDataOnlyFillModelAlgorithm(QCAlgorithm):
|
||||
def trade(self):
|
||||
if not self.portfolio.invested:
|
||||
if self.time.hour != 9 or self.time.minute != 30:
|
||||
raise Exception(f"Unexpected event time {self.time}")
|
||||
raise AssertionError(f"Unexpected event time {self.time}")
|
||||
|
||||
ticket = self.buy("SPY", 1)
|
||||
if ticket.status != OrderStatus.SUBMITTED:
|
||||
raise Exception(f"Unexpected order status {ticket.status}")
|
||||
raise AssertionError(f"Unexpected order status {ticket.status}")
|
||||
|
||||
def on_order_event(self, order_event: OrderEvent):
|
||||
self.debug(f"OnOrderEvent:: {order_event}")
|
||||
if order_event.status == OrderStatus.FILLED and (self.time.hour != 10 or self.time.minute != 0):
|
||||
raise Exception(f"Unexpected fill time {self.time}")
|
||||
raise AssertionError(f"Unexpected fill time {self.time}")
|
||||
|
||||
class ForwardDataOnlyFillModel(EquityFillModel):
|
||||
def fill(self, parameters: FillModelParameters):
|
||||
|
||||
Reference in New Issue
Block a user