Refactor some unit and regression tests for speed improvements (#8970)
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

* Reduce history unit tests duration

* Unit and regression tests speed improvements

* Minor change

* Fix unit test race condition
This commit is contained in:
Jhonathan Abreu
2025-09-12 10:15:09 -04:00
committed by GitHub
parent 5b465216f9
commit 5644520545
16 changed files with 219 additions and 144 deletions
@@ -30,16 +30,16 @@ class TickHistoryRequestWithoutTickSubscriptionRegressionAlgorithm(QCAlgorithm):
# Requesting history for SPY and IBM (separately) with tick resolution
spy_history = self.history[Tick](spy, timedelta(days=1), Resolution.TICK)
if len(list(spy_history)) == 0:
if not any(spy_history):
raise AssertionError("SPY tick history is empty")
ibm_history = self.history[Tick](ibm, timedelta(days=1), Resolution.TICK)
if len(list(ibm_history)) == 0:
if not any(ibm_history):
raise AssertionError("IBM tick history is empty")
# Requesting history for SPY and IBM (together) with tick resolution
spy_ibm_history = self.history[Tick]([spy, ibm], timedelta(days=1), Resolution.TICK)
if len(list(spy_ibm_history)) == 0:
if not any(spy_ibm_history):
raise AssertionError("Compound SPY and IBM tick history is empty")
self.quit()