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
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:
+6
-2
@@ -34,13 +34,17 @@ class PeriodBasedHistoryRequestNotAllowedWithTickResolutionRegressionAlgorithm(Q
|
||||
"Tick history call with symbol array with explicit tick resolution")
|
||||
|
||||
history = self.history[Tick](spy, TimeSpan.from_hours(12))
|
||||
if len(list(history)) == 0:
|
||||
# Check whether history has data without enumerating the whole list
|
||||
if not any(x for x in history):
|
||||
raise AssertionError("On history call with implicit tick resolution: history returned no results")
|
||||
|
||||
history = self.history[Tick](spy, TimeSpan.from_hours(12), Resolution.TICK)
|
||||
if len(list(history)) == 0:
|
||||
if not any(x for x in history):
|
||||
raise AssertionError("On history call with explicit tick resolution: history returned no results")
|
||||
|
||||
# We already tested what we wanted to test, we can quit now
|
||||
self.quit()
|
||||
|
||||
def assert_that_history_throws_for_tick_resolution(self, history_call, history_call_description):
|
||||
try:
|
||||
history_call()
|
||||
|
||||
Reference in New Issue
Block a user