Minor python syntax fixes (#8711)
Syntax Tests / 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
Python Virtual Environments / build (push) Has been cancelled

This commit is contained in:
Martin-Molinero
2025-04-22 10:54:44 -03:00
committed by GitHub
parent 1ad4afa54e
commit 1be7c9e141
2 changed files with 5 additions and 5 deletions
@@ -37,7 +37,7 @@ class AddFutureOptionContractDataStreamingRegressionAlgorithm(QCAlgorithm):
Resolution.MINUTE).symbol
# Get option contract lists for 2020/01/05 (timedelta(days=1)) because Lean has local data for that date
option_chains = self.option_chain_provider.get_option_contract_list(self.es20h20, self.time + timedelta(days=1))
option_chains = list(self.option_chain_provider.get_option_contract_list(self.es20h20, self.time + timedelta(days=1)))
option_chains += self.option_chain_provider.get_option_contract_list(self.es19m20, self.time + timedelta(days=1))
for option_contract in option_chains:
@@ -80,7 +80,7 @@ class AddFutureOptionContractDataStreamingRegressionAlgorithm(QCAlgorithm):
if len(self.symbols_received) != len(self.expected_symbols_received):
raise AssertionError(f"Expected {len(self.expected_symbols_received)} option contracts Symbols, found {len(self.symbols_received)}")
missing_symbols = [expected_symbol for expected_symbol in self.expected_symbols_received if expected_symbol not in self.symbols_received]
missing_symbols = [expected_symbol.value for expected_symbol in self.expected_symbols_received if expected_symbol not in self.symbols_received]
if any(missing_symbols):
raise AssertionError(f'Symbols: "{", ".join(missing_symbols)}" were not found in OnData')