7
7
from polars import DataFrame
8
8
9
9
from investing_algorithm_framework .domain import OperationalException , \
10
- TimeFrame , DATETIME_FORMAT
10
+ DATETIME_FORMAT
11
11
from investing_algorithm_framework .infrastructure import \
12
12
CSVOHLCVMarketDataSource
13
13
@@ -36,7 +36,7 @@ def setUp(self) -> None:
36
36
37
37
def test_right_columns (self ):
38
38
file_name = "OHLCV_BTC-EUR_BINANCE" \
39
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
39
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
40
40
data_source = CSVOHLCVMarketDataSource (
41
41
csv_file_path = f"{ self .resource_dir } /market_data_sources/"
42
42
f"{ file_name } " ,
@@ -50,7 +50,7 @@ def test_right_columns(self):
50
50
51
51
def test_throw_exception_when_missing_column_names_columns (self ):
52
52
file_name = "OHLCV_BTC-EUR_BINANCE_2h_NO_COLUMNS_2023-" \
53
- "08-07:07: 59_2023-12-02:00: 00.csv"
53
+ "08-07-07- 59_2023-12-02-00- 00.csv"
54
54
55
55
with self .assertRaises (OperationalException ):
56
56
CSVOHLCVMarketDataSource (
@@ -63,7 +63,7 @@ def test_throw_exception_when_missing_column_names_columns(self):
63
63
def test_start_date (self ):
64
64
start_date = datetime (2023 , 8 , 7 , 8 , 0 , tzinfo = tzutc ())
65
65
file_name = "OHLCV_BTC-EUR_BINANCE" \
66
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
66
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
67
67
csv_ohlcv_market_data_source = CSVOHLCVMarketDataSource (
68
68
csv_file_path = f"{ self .resource_dir } /"
69
69
"market_data_sources/"
@@ -81,7 +81,7 @@ def test_start_date_with_window_size(self):
81
81
year = 2023 , month = 8 , day = 7 , hour = 10 , minute = 0 , tzinfo = tzutc ()
82
82
)
83
83
file_name = "OHLCV_BTC-EUR_BINANCE" \
84
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
84
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
85
85
csv_ohlcv_market_data_source = CSVOHLCVMarketDataSource (
86
86
csv_file_path = f"{ self .resource_dir } /"
87
87
"market_data_sources/"
@@ -101,7 +101,7 @@ def test_start_date_with_window_size(self):
101
101
def test_end_date (self ):
102
102
end_date = datetime (2023 , 12 , 2 , 0 , 0 , tzinfo = tzutc ())
103
103
file_name = "OHLCV_BTC-EUR_BINANCE" \
104
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
104
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
105
105
csv_ohlcv_market_data_source = CSVOHLCVMarketDataSource (
106
106
csv_file_path = f"{ self .resource_dir } /"
107
107
"market_data_sources/"
@@ -115,7 +115,7 @@ def test_end_date(self):
115
115
116
116
def test_empty (self ):
117
117
file_name = "OHLCV_BTC-EUR_BINANCE" \
118
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
118
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
119
119
data_source = CSVOHLCVMarketDataSource (
120
120
csv_file_path = f"{ self .resource_dir } /"
121
121
"market_data_sources/"
@@ -127,7 +127,7 @@ def test_empty(self):
127
127
128
128
def test_get_data (self ):
129
129
file_name = \
130
- "OHLCV_BTC-EUR_BITVAVO_2h_2023-07-21:14: 00_2024-06-07:10: 00.csv"
130
+ "OHLCV_BTC-EUR_BITVAVO_2h_2023-07-21-14- 00_2024-06-07-10- 00.csv"
131
131
datasource = CSVOHLCVMarketDataSource (
132
132
csv_file_path = f"{ self .resource_dir } /"
133
133
"market_data_sources_for_testing/"
@@ -149,7 +149,7 @@ def test_get_data(self):
149
149
150
150
def test_get_identifier (self ):
151
151
file_name = "OHLCV_BTC-EUR_BINANCE" \
152
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
152
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
153
153
datasource = CSVOHLCVMarketDataSource (
154
154
csv_file_path = f"{ self .resource_dir } /"
155
155
"market_data_sources/"
@@ -161,7 +161,7 @@ def test_get_identifier(self):
161
161
162
162
def test_get_market (self ):
163
163
file_name = "OHLCV_BTC-EUR_BINANCE" \
164
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
164
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
165
165
datasource = CSVOHLCVMarketDataSource (
166
166
csv_file_path = f"{ self .resource_dir } /"
167
167
"market_data_sources/"
@@ -172,7 +172,7 @@ def test_get_market(self):
172
172
173
173
def test_get_symbol (self ):
174
174
file_name = "OHLCV_BTC-EUR_BINANCE" \
175
- "_2h_2023-08-07:07: 59_2023-12-02:00: 00.csv"
175
+ "_2h_2023-08-07-07- 59_2023-12-02-00- 00.csv"
176
176
datasource = CSVOHLCVMarketDataSource (
177
177
csv_file_path = f"{ self .resource_dir } /"
178
178
"market_data_sources/"
0 commit comments