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:
@@ -40,12 +40,12 @@ class CustomMarginInterestRateModelAlgorithm(QCAlgorithm):
|
||||
|
||||
def on_end_of_algorithm(self):
|
||||
if self._margin_interest_rate_model.call_count == 0:
|
||||
raise Exception("CustomMarginInterestRateModel was not called")
|
||||
raise AssertionError("CustomMarginInterestRateModel was not called")
|
||||
|
||||
expected_cash = self._cash_after_order * pow(1 + self._margin_interest_rate_model.interest_rate, self._margin_interest_rate_model.call_count)
|
||||
|
||||
if abs(self.portfolio.cash - expected_cash) > 1e-10:
|
||||
raise Exception(f"Expected cash {expected_cash} but got {self.portfolio.cash}")
|
||||
raise AssertionError(f"Expected cash {expected_cash} but got {self.portfolio.cash}")
|
||||
|
||||
|
||||
class CustomMarginInterestRateModel:
|
||||
|
||||
Reference in New Issue
Block a user