Skip to content

Commit 7157bc0

Browse files
Guillaume De Saint MartinGuillaumeDSM
authored andcommitted
[MemoryCheck] ignore uninitialized exchange managers
1 parent 50a97c2 commit 7157bc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

octobot/backtesting/octobot_backtesting.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ def check_remaining_objects(self):
198198
}
199199
for obj in gc.get_objects():
200200
if isinstance(obj, to_watch_objects):
201+
if isinstance(obj, exchanges.ExchangeManager) and not obj.is_initialized:
202+
# Ignore exchange managers that have not been initialized
203+
# and are irrelevant. Pytest fixtures can also retain references failing tests
204+
continue
201205
objects_references[type(obj)][1].append(obj)
202206
objects_references[type(obj)] = (objects_references[type(obj)][0] + 1,
203207
objects_references[type(obj)][1])

0 commit comments

Comments
 (0)