Skip to content

Commit ff36564

Browse files
committed
Fix windows tests
1 parent 4d5db3d commit ff36564

23 files changed

+19
-1961
lines changed

tests/app/algorithm/test_close_position.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def setUp(self) -> None:
4040
csv_file_path=os.path.join(
4141
self.resource_directory,
4242
"market_data_sources",
43-
"TICKER_BTC-EUR_BINANCE_2023-08-23:22:00_2023-12-02:00:00.csv"
43+
"TICKER_BTC-EUR_BINANCE_2023-08-23-22-00_2023-12-02-00-00.csv"
4444
)
4545
))
4646

tests/app/algorithm/test_close_trade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def setUp(self) -> None:
4040
csv_file_path=os.path.join(
4141
self.resource_directory,
4242
"market_data_sources",
43-
"TICKER_BTC-EUR_BINANCE_2023-08-23:22:00_2023-12-02:00:00.csv"
43+
"TICKER_BTC-EUR_BINANCE_2023-08-23-22-00_2023-12-02-00-00.csv"
4444
)
4545
))
4646

tests/app/algorithm/test_get_closed_trades.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def setUp(self) -> None:
3434
csv_file_path=os.path.join(
3535
self.resource_directory,
3636
"market_data_sources",
37-
"TICKER_BTC-EUR_BINANCE_2023-08-23:22:00_2023-12-02:00:00.csv"
37+
"TICKER_BTC-EUR_BINANCE_2023-08-23-22-00_2023-12-02-00-00.csv"
3838
)
3939
))
4040

tests/app/algorithm/test_get_open_trades.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def setUp(self) -> None:
3535
csv_file_path=os.path.join(
3636
self.resource_directory,
3737
"market_data_sources_for_testing",
38-
"TICKER_BTC-EUR_BINANCE_2023-08-23:22:00_2023-12-02:00:00.csv"
38+
"TICKER_BTC-EUR_BINANCE_2023-08-23-22-00_2023-12-02-00-00.csv"
3939
)
4040
)
4141
)

tests/app/algorithm/test_get_trades.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def setUp(self) -> None:
3434
csv_file_path=os.path.join(
3535
self.resource_directory,
3636
"market_data_sources_for_testing",
37-
"TICKER_BTC-EUR_BINANCE_2023-08-23:22:00_2023-12-02:00:00.csv"
37+
"TICKER_BTC-EUR_BINANCE_2023-08-23-22-00_2023-12-02-00-00.csv"
3838
)
3939
))
4040

tests/app/algorithm/test_trade_price_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_trade_recent_price_update(self):
7474
csv_file_path=os.path.join(
7575
self.resource_dir,
7676
"market_data_sources",
77-
"OHLCV_BTC-EUR_BINANCE_2h_2023-08-07:07:59_2023-12-02:00:00.csv"
77+
"OHLCV_BTC-EUR_BINANCE_2h_2023-08-07-07-59_2023-12-02-00-00.csv"
7878
)
7979
)
8080
)
@@ -86,7 +86,7 @@ def test_trade_recent_price_update(self):
8686
csv_file_path=os.path.join(
8787
self.resource_dir,
8888
"market_data_sources",
89-
"TICKER_DOT-EUR_BINANCE_2023-08-23:22:00_2023-12-02:00:00.csv"
89+
"TICKER_DOT-EUR_BINANCE_2023-08-23-22-00_2023-12-02-00-00.csv"
9090
)
9191
)
9292
)

tests/infrastructure/market_data_sources/test_csv_ohlcv_market_data_source.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from polars import DataFrame
88

99
from investing_algorithm_framework.domain import OperationalException, \
10-
TimeFrame, DATETIME_FORMAT
10+
DATETIME_FORMAT
1111
from investing_algorithm_framework.infrastructure import \
1212
CSVOHLCVMarketDataSource
1313

@@ -36,7 +36,7 @@ def setUp(self) -> None:
3636

3737
def test_right_columns(self):
3838
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"
4040
data_source = CSVOHLCVMarketDataSource(
4141
csv_file_path=f"{self.resource_dir}/market_data_sources/"
4242
f"{file_name}",
@@ -50,7 +50,7 @@ def test_right_columns(self):
5050

5151
def test_throw_exception_when_missing_column_names_columns(self):
5252
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"
5454

5555
with self.assertRaises(OperationalException):
5656
CSVOHLCVMarketDataSource(
@@ -63,7 +63,7 @@ def test_throw_exception_when_missing_column_names_columns(self):
6363
def test_start_date(self):
6464
start_date = datetime(2023, 8, 7, 8, 0, tzinfo=tzutc())
6565
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"
6767
csv_ohlcv_market_data_source = CSVOHLCVMarketDataSource(
6868
csv_file_path=f"{self.resource_dir}/"
6969
"market_data_sources/"
@@ -81,7 +81,7 @@ def test_start_date_with_window_size(self):
8181
year=2023, month=8, day=7, hour=10, minute=0, tzinfo=tzutc()
8282
)
8383
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"
8585
csv_ohlcv_market_data_source = CSVOHLCVMarketDataSource(
8686
csv_file_path=f"{self.resource_dir}/"
8787
"market_data_sources/"
@@ -101,7 +101,7 @@ def test_start_date_with_window_size(self):
101101
def test_end_date(self):
102102
end_date = datetime(2023, 12, 2, 0, 0, tzinfo=tzutc())
103103
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"
105105
csv_ohlcv_market_data_source = CSVOHLCVMarketDataSource(
106106
csv_file_path=f"{self.resource_dir}/"
107107
"market_data_sources/"
@@ -115,7 +115,7 @@ def test_end_date(self):
115115

116116
def test_empty(self):
117117
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"
119119
data_source = CSVOHLCVMarketDataSource(
120120
csv_file_path=f"{self.resource_dir}/"
121121
"market_data_sources/"
@@ -127,7 +127,7 @@ def test_empty(self):
127127

128128
def test_get_data(self):
129129
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"
131131
datasource = CSVOHLCVMarketDataSource(
132132
csv_file_path=f"{self.resource_dir}/"
133133
"market_data_sources_for_testing/"
@@ -149,7 +149,7 @@ def test_get_data(self):
149149

150150
def test_get_identifier(self):
151151
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"
153153
datasource = CSVOHLCVMarketDataSource(
154154
csv_file_path=f"{self.resource_dir}/"
155155
"market_data_sources/"
@@ -161,7 +161,7 @@ def test_get_identifier(self):
161161

162162
def test_get_market(self):
163163
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"
165165
datasource = CSVOHLCVMarketDataSource(
166166
csv_file_path=f"{self.resource_dir}/"
167167
"market_data_sources/"
@@ -172,7 +172,7 @@ def test_get_market(self):
172172

173173
def test_get_symbol(self):
174174
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"
176176
datasource = CSVOHLCVMarketDataSource(
177177
csv_file_path=f"{self.resource_dir}/"
178178
"market_data_sources/"

0 commit comments

Comments
 (0)