From 6ab528748ec3e007b30b7268966758c7e2dab76f Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 6 Dec 2024 06:40:15 +0100 Subject: [PATCH] tests: Update orderflow tests --- freqtrade/data/converter/orderflow.py | 2 -- freqtrade/strategy/interface.py | 1 - tests/data/test_converter_orderflow.py | 10 +++------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/freqtrade/data/converter/orderflow.py b/freqtrade/data/converter/orderflow.py index c3a622522..993b5eebc 100644 --- a/freqtrade/data/converter/orderflow.py +++ b/freqtrade/data/converter/orderflow.py @@ -4,14 +4,12 @@ Functions to convert orderflow data from public_trades import logging import time -from collections import OrderedDict from datetime import datetime import numpy as np import pandas as pd from freqtrade.constants import DEFAULT_ORDERFLOW_COLUMNS, Config -from freqtrade.enums import RunMode from freqtrade.exceptions import DependencyException diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 1babfdcd6..24de4252c 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -5,7 +5,6 @@ This module defines the interface to apply for strategies import logging from abc import ABC, abstractmethod -from collections import OrderedDict from datetime import datetime, timedelta, timezone from math import isinf, isnan diff --git a/tests/data/test_converter_orderflow.py b/tests/data/test_converter_orderflow.py index c73706bed..ded6d2088 100644 --- a/tests/data/test_converter_orderflow.py +++ b/tests/data/test_converter_orderflow.py @@ -1,5 +1,3 @@ -from collections import OrderedDict - import numpy as np import pandas as pd import pytest @@ -105,7 +103,7 @@ def test_public_trades_mock_populate_dataframe_with_trades__check_orderflow( }, } # Apply the function to populate the data frame with order flow data - df, _ = populate_dataframe_with_trades(OrderedDict(), config, dataframe, trades) + df, _ = populate_dataframe_with_trades(None, config, dataframe, trades) # Extract results from the first row of the DataFrame results = df.iloc[0] t = results["trades"] @@ -246,7 +244,7 @@ def test_public_trades_trades_mock_populate_dataframe_with_trades__check_trades( } # Populate the DataFrame with trades and order flow data - df, _ = populate_dataframe_with_trades(OrderedDict(), config, dataframe, trades) + df, _ = populate_dataframe_with_trades(None, config, dataframe, trades) # --- DataFrame and Trade Data Validation --- @@ -404,9 +402,7 @@ def test_public_trades_config_max_trades( }, } - df, _ = populate_dataframe_with_trades( - OrderedDict(), default_conf | orderflow_config, dataframe, trades - ) + df, _ = populate_dataframe_with_trades(None, default_conf | orderflow_config, dataframe, trades) assert df.delta.count() == 1